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
Basvb
.
unused user images on commons, credits to Bawolff and https://wikitech.wikimedia.org/wiki/Nova_Resource:Tools/Shared_Resources/MySQL_queries for most of the work.
Toggle Highlighting
SQL
use commonswiki_p; SELECT CONCAT("[[:File:", img_name, "]]" ) as 'link', img_timestamp as 'upload date', img_user_text as 'uploader' FROM image JOIN page p1 ON p1.page_namespace = 6 AND p1.page_title = img_name JOIN categorylinks ON cl_from = page_id AND cl_type = "file" AND cl_to = "User_page_images" LEFT JOIN globalimagelinks ON gil_to = img_name LEFT join imagelinks ON il_to = img_name left join page p2 on il_from = p2.page_id and p2.page_title not like 'OgreBot/%' WHERE gil_to IS NULL and p2.page_id is NULL GROUP BY img_name HAVING count(cl_to)=1 ORDER BY img_user_text desc;
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...