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 (
'DYK_images',
'Wikipedia_image_placeholders',
'Wikipedia_restricted_images',
'Featured_pictures',
'Wikipedia_restricted_images',
'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')
LEFT JOIN templatelinks t ON t.tl_from = p.page_id
AND t.tl_namespace = 10
AND t.tl_title IN ('Non-free_use_rationale',
'Non-free_use_rationale_2',
'Non-free_media_rationale',
'Non-free_media_data',
## Commons related
'Convert_to_SVG_and_copy_to_Wikimedia_Commons',
'Copy_to_Wikimedia_Commons',
'ShadowsCommons',
'Now_Commons',
# 'Do_not_move_to_Commons',
## Keep local
'Keep_local',
# 'Keep_local_high-risk',
#'No_Commons-requested',
#'No_Commons_requested',
## Missing license data
# 'Somewebsite',
# 'No_copyright_information',
# 'No_copyright_holder',
# 'Untagged',
# 'untagged',
# 'Wrong-license',
## local deltion process
'Db-meta',
'Db-redircommons',
'Deletable_file',
'Duplicate',
'File_at_CCI',
'Ffd',
'hidden-delete-reason',
'AutoReplaceable_fair_use_people',
'Proposed_deletion/dated_files',
## Protected
'Restricted_use',
'badimage',
'Soft_redirect',
## 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',
'Portal:Star/Selected_picture/template',
'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',
'Non-free_media',
# 'Out_of_copyright_in',
## Free in US media
'Free_in_US_media',
## "Problem" tags
'Badimage',
'Soft_redirect',
## 'License tags needing manual review
## 'PD-Russia',
## Self##
'PD-self',
'GFDL-self',
'Self',
'Multilicense_replacing_placeholder'
'Multilicense_replacing_placeholder_new',
## Wikimedia ##
# 'Copyright_by_Wikimedia',
## Misc
# 'Userspace_file',
# 'Esoteric_file',
# 'Example_files',
'Information',
'Artwork',
'Spoken_article_entry',
'Google_Art_Project',
'M-cropped',
'Split_media',
'Uploaded_from_Commons'
# 'Wikipedia-screenshot'
)
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_len > 0
AND p.page_len < 20000
AND p.page_namespace = 6
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.