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
.
Toggle Highlighting
SQL
use commonswiki_p; SELECT CONCAT("File:", img_name, "|" ) as 'link', img_timestamp as 'upload date', img_user_text as 'uploader', count(cl_to) as 'nrofcats' 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 img_name in (SELECT img_name 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/%' and p2.page_title not like 'Basvb/%' and p2.page_title not like 'LX%' WHERE gil_to IS NULL and p2.page_id is NULL AND img_timestamp<20160110000000 GROUP BY img_name ORDER BY img_timestamp desc) GROUP BY img_name;
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...