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
Ranjithsiji
.
Give the list of files in a category. It also gives the categories attached to each file in that category. This is used to find union, intersection, missing files in a category in Commons. Very usefull in Wiki Loves X
Toggle Highlighting
SQL
SELECT p.page_title AS file_name, left(i.img_timestamp,8) as imgdate, i.img_timestamp, i.img_size, a.actor_name, GROUP_CONCAT(clt.cl_to ORDER BY clt.cl_to ASC SEPARATOR ', ') AS categories FROM page AS p JOIN categorylinks AS clf ON p.page_id = clf.cl_from JOIN categorylinks AS clt ON clf.cl_from = clt.cl_from JOIN image i ON i.img_name = p.page_title AND p.page_namespace = 6 AND p.page_is_redirect=0 JOIN actor_image a ON i.img_actor = a.actor_id WHERE clf.cl_to = 'Images_from_Wiki_Loves_Birds_India_2024' GROUP BY p.page_title;
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...