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
Bloody-libu
.
Toggle Highlighting
SQL
USE jawiki_p; SELECT CONCAT("# [[:File:", a.img_name, "]]") AS Wiki#, CONCAT("[[:File:", b.img_name, "]]") AS Commons #, b.img_timestamp #SELECT CONCAT("pwb.py image.py -lang:ja -family:wikipedia -putthrottle:0 -loose ¤", a.img_name, "¤ ¤", b.img_name, "¤") AS pywiki FROM image a INNER JOIN page p ON p.page_title = a.img_name AND p.page_namespace = 6 INNER JOIN categorylinks c ON c.cl_from = p.page_id AND c.cl_to = "基礎自治体位置図" #"Locator_maps_of_municipalities_in_Japan_based_on_maps_by_Lincun" #"Files_uploaded_by_MK_Products_-_NowCommons"# INNER JOIN categorylinks c1 ON p.page_id = c1.cl_from LEFT JOIN imagelinks i ON p.page_title = i.il_to #AND (i.il_from_namespace = 0) # NS 0 = articles ; so this line is to see if file is used anywhere #join commonswiki_p.image b on b.img_name != a.img_name and b.img_sha1 = a.img_sha1 #Dif name only join commonswiki_p.image b on b.img_sha1 = a.img_sha1 #All files #WHERE b.img_timestamp > 20200600000000 #WHERE i.il_from IS NOT NULL #IS NULL = Not in use ; IS NOT NULL = In use GROUP BY a.img_name ASC
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...