Fork of Untitled query #10179 by Sfan00 IMG
This query is marked as a draft This query has been published by Sfan00 IMG.

SQL

AخA
 
USE enwiki_p;
SELECT p.page_id,p.page_len,p.page_title FROM page p
INNER JOIN categorylinks c ON c.cl_from = p.page_id AND c.cl_to = 'All_free_media'
LEFT JOIN templatelinks t ON t.tl_from = p.page_id AND t.tl_namespace = 10 AND t.tl_title IN
  ( 
    ## Commons related 
    'Convert_to_SVG_and_copy_to_Wikimedia_Commons', 
    'ShadowsCommons', 
    'Now_Commons', 
   
    ## Keep local
    'Keep_local', 
    'Do not move to Commons',
    'No_Commons_requested',
    ## local deltion process
    'Db-meta', 
    'Deletable_file',
    'Duplicate','Ffd', 
    'File_at_CCI', 
    'Wrong-license',
    'Wrong_license',
    'Hidden-delete-reason',
    ## Protected 
    'Pp', 
    'Pp-template', 
    'Protected_generic_image_name', 
    'Protected_sister_project_logo',
    'Pp-semi-indef',
    'pp-move-indef',
    'pp-upload',
    ## Files that are deemed to be self-made
    'Self',
    'PD-self', 
    'GFDL-self', 
    'GFDL-self-with-disclaimers', 
    'Multilicense replacing placeholder',
    'Multilicense_replacing_placeholder_new', 
  ## Known tags
  ## USGov
    'PD-LosAlamos',
    'PD-NWS',
    'PD-OakRidge',
    'PD-USGov',
    'PD-USGov-AID',
    'PD-USGov-Atlas',
    'PD-USGov-Award',
    'PD-USGov-CIA',
    'PD-USGov-CIA-WF',
    'PD-USGov-Congress',
    'PD-USGov-Congress-AOC',
    'PD-USGov-Courts',
    'PD-USGov-DEA',
    'PD-USGov-DHS',
    'PD-USGov-DHS-CG',
    'PD-USGov-DHS-FEMA',
    'PD-USGov-DOC',
    'PD-USGov-DOC-Census',
    'PD-USGov-DOC-NOAA',
    'PD-USGov-DOE',
    'PD-USGov-DOE-ANL',
    'PD-USGov-DOJ',
    'PD-USGov-DOL',
    'PD-USGov-DOT',
    'PD-USGov-DOT-FAA',
    'PD-USGOV-DVIC',
    'PD-USGov-Education',
    'PD-USGov-EPA',
    'PD-USGov-FBI',
    'PD-USGov-FCC',
    'PD-USGov-FDA',
    'PD-USGov-Fed',
    'PD-USGov-FSA',
    'PD-USGov-FTC',
    'PD-USGov-GAO',
    'PD-USGov-GPO',
    'PD-USGov-GSA',
    'PD-USGov-HHS',
    'PD-USGov-HHS-CDC',
    'PD-USGov-HHS-NIH',
    'PD-USGov-Interior',
    'PD-USGov-Interior-BLM',
    'PD-USGov-Interior-FWS',
    'PD-USGov-Interior-HABS',
    'PD-USGov-Interior-MMS',
    'PD-USGov-Interior-NPS',
    'PD-USGov-Interior-USBR',
    'PD-USGov-Interior-USGS',
    'PD-USGov-Interior-USGS-Minerals',
    'PD-USGov-Military',
    'PD-USGov-Military-Air_Force',
    'PD-USGov-Military-Air-National-Guard',
    'PD-USGov-Military-Army',
    'PD-USGov-Military-Army National Guard',
    'PD-USGov-Military-Army-USACE',
    'PD-USGov-Military-Army-USACMH',
    'PD-USGov-Military-Army-USAIOH',
    'PD-USGov-Military-Army-USAMHI',
    'PD-USGov-Military-Award',
    'PD-USGov-Military-Badge',
    'PD-USGov-Military-DVIC',
    'PD-USGov-Military-JCS',
    'PD-USGov-Military-Marines',
    'PD-USGov-Military-MDA',
    'PD-USGov-Military-Navy',
    'PD-USGov-money',
    'PD-USGov-MUTCD',
    'PD-USGov-NASA',
    'PD-USGov-NCBI-scienceprimer',
    'PD-USGov-NEA',
    'PD-USGov-NRC',
    'PD-USGov-NRO',
    'PD-USGov-NSA',
    'PD-USGov-NSF',
    'PD-USGov-NTSB',
    'PD-USGov-OWI',
    'PD-USGov-PHS',
    'PD-USGov-POTUS',
    'PD-USGov-pre1978stamp',
    'PD-USGov-SEC',
    'PD-USGov-SI',
    'PD-USGov-SSA',
    'PD-USGov-State',
    'PD-USGov-Treasury',
    'PD-USGov-TVA',
    'PD-USGov-USDA',
    'PD-USGov-USDA-AMS',
    'PD-USGov-USDA-ARS',
    'PD-USGov-USDA-FAS',
    'PD-USGov-USDA-FS',
    'PD-USGov-USDA-NAL',
    'PD-USGov-USDA-NRCS',
    'PD-USGov-VA',
    'PD-USGov-VOA',
    'PD-USGov-WPA',
    'PD-WorldWind',
 
  ##us
  'PD-1923',
  ##age
  'PD-old',
  'PD-old-100','PD-old-70',
  'PD-art',
  'PD-art-3d',
  
  ## PD-ineligible
  'PD-ineligible',
  'PD-ineligible-USonly',
  'PD-textlogo',
  'PD-text',
  'PD-simple',  
  'PD-logo',
  
  ## PD Geographic
  'PD-Russia-2008',
  'PD-US-1923-abroad',
  'PD-Italy',
  'PD-US',
  'PD-UK',
  'PD-NZ',
  'PD-UK',
  'PD-UKGov',
  'PD-Canada',
  'PD-India',
  'PD-Australia'
    
    
    ## featured content
    'FeaturedPicture', 
    'Featured_Picture', 
    'Former_featured_picture', 
    'Featured_sound', 
    ## OTRS
    'OTRS_pending', 
    'OTRS_received',
    ## Non-free media
    'NFUR_not_needed', 
    'Non-free_media',  
    'Out_of_copyright_in',
    ## Misc    
    'DYKfile',  
    'Example_files', 
    'Information',
    'Painting',
    'Spoken_article_entry',
    'Google_Art_Project', 
    'Split_media',
    'Wikipedia-screenshot'
  )
WHERE t.tl_from IS NULL
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.

Checking query status...