Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
Fork of
Most common categories (with WD qids) for Commons file pages linked from a page
by
Jheald
This query is marked as a draft
This query has been published
by
Jheald
.
Toggle Highlighting
SQL
use commonswiki_p; SELECT COUNT(DISTINCT(tl.tl_from)) AS $count, cl.cl_to, cpp.pp_value FROM templatelinks AS tl JOIN categorylinks AS cl ON cl.cl_from = tl.tl_from # categories for file description pages JOIN page AS cp ON cp.page_namespace = 14 AND cp.page_title = cl.cl_to LEFT JOIN page_props AS cpp ON cpp.pp_page = cp.page_id AND cpp.pp_propname = 'wikibase_item' WHERE tl.tl_title='Mechanical Curator image' GROUP BY cl.cl_to, cpp.pp_value ORDER BY $count 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...