Fork of
Untitled query #10058
by Sfan00 IMG
This query is marked as a draft
This query has been published
by ShakespeareFan00.
SQL
x
USE enwiki_p;
SELECT p.page_id,p.page_len,CONCAT("File:",p.page_title) FROM page p
LEFT JOIN page_restrictions ON pr_page = p.page_id
LEFT JOIN categorylinks c2 ON c2.cl_from = p.page_id AND c2.cl_to IN (
'Wikipedia_restricted_images',
'DYK_images',
'Wikipedia_image_placeholders',
'Wikipedia_restricted_images',
'Featured_pictures',
'Featured_pictures_on_Mathematics_Portal',
'Featured_pictures_of_Star_Portal',
'Wikipedia_Picture_of_the_day_files',
'All_non-free_media',
'Self-published_work',
'Wikipedia_awards',
'All_replaceable_non-free_use_Wikipedia_files',
'Non-free_images_for_NFUR_review',
'All_redirects_for_discussion',
'Wikipedia_files_for_discussion',
'All_files_proposed_for_deletion',
'Duplicate_Wikipedia_files',
'Wikipedia_files_requiring_splitting',
'All_Wikipedia_files_missing_evidence_of_permission',
'All_Wikipedia_files_with_unknown_copyright_status',
'All_Wikipedia_files_with_unknown_source',
'All_Wikipedia_files_with_the_same_name_on_Wikimedia_Commons',
'All_Wikipedia_files_with_a_different_name_on_Wikimedia_Commons',
## 'Files_with_no_machine-readable_source',
'Candidates_for_speedy_deletion',
'Candidates_for_speedy_deletion_as_copyright_violations',
'Candidates_for_speedy_deletion_as_copyright_violations',
## 'Copy_to_Wikimedia_Commons',
'Copy_to_Wikimedia_Commons_(inline-identified)',
'Copy_to_Wikimedia_Commons_(bot-assessed)',
'Copy_to_Wikimedia_Commons_reviewed_by_ShakespeareFan00'
## 'Unclaimed_images_thought_to_be_uploader'
)
LEFT JOIN templatelinks t ON t.tl_from = p.page_id
AND t.tl_namespace = 10
AND t.tl_title IN (
## local redirects
'Db-redircommons',
'Db-redircom',
'Db-imgcopyvio',
## featured content
'FeaturedPicture',
'Featured_picture',
'Former_featured_picture',
'Featured_sound',
'Former_featured_sound',
'FSC',
'Gujarat_selected_picture',
'FPCold',
'VPCold',
'Thailandportal',
'Asian_Games_selected_picture',
'Picture_of_the_day',
'SP_Massachusetts',
'SP_India_UP',
'Nanotech_selected',
'Fishportal',
'Brazilian_selected_picture',
'USMCportal',
'PISPC',
## Other local tags for files at Commons (and eslewhere)
'Qxz-adnavbox',
'DYKfile',
'Wikipedia-adnavbox',
## OTRS
##'OTRS_pending',
##'OTRS_received',
## Non-free media
'NFUR_not_needed',
## 'Out_of_copyright_in',
## 'License tags needing manual review
'PD-US-1923-abroad',
'Cc-by-2.5',
'Information',
'Image_information_art',
'Painting',
'Artwork',
'Spoken_article_entry',
'Google_Art_Project'
)
WHERE t.tl_from IS NULL
AND c2.cl_from IS NULL
AND pr_page IS NULL
AND p.page_is_redirect = FALSE
AND p.page_namespace = 6
AND p.page_len > 0
By running queries you agree to the Cloud Services Terms of Use and you irrevocably agree to release your SQL under CC0 License.
All SQL code is licensed under CC0 License.