Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
This query is marked as a draft
This query has been published
by
Stefan2
.
Finds files to tag with {{NowCommons}}.
Toggle Highlighting
SQL
USE metawiki_p;#enwiki_p; SELECT p.page_id FROM page p INNER JOIN (image e JOIN commonswiki_p.image c ON c.img_sha1 = e.img_sha1) ON e.img_name = p.page_title #LEFT JOIN categorylinks c ON c.cl_from = p.page_id AND c.cl_to IN ('All_Wikipedia_files_with_a_different_name_on_Wikimedia_Commons', # 'All_Wikipedia_files_with_the_same_name_on_Wikimedia_Commons', # 'Wikipedia_files_on_Wikimedia_Commons_for_which_a_local_copy_has_been_requested_to_be_kept') WHERE p.page_namespace = 6 #AND c.cl_from IS NULL #AND e.img_name != c.img_name #better start with files available under different names as they become more difficult to find if later overwritten #LIMIT 10
By running queries you agree to the
Cloud Services Terms of Use
and you irrevocably agree to release your SQL under
CC0 License
.
Submit Query
Stop Query
All SQL code is licensed under
CC0 License
.
Checking query status...