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 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(pl.pl_title)) AS $count, cl.cl_to FROM page AS p0 JOIN pagelinks AS pl ON pl.pl_from=p0.page_id AND pl.pl_from_namespace=p0.page_namespace AND pl.pl_namespace=6 # links to file description pages JOIN page AS fp ON fp.page_title = pl.pl_title JOIN categorylinks AS cl ON cl.cl_from = fp.page_id # categories for file description pages WHERE p0.page_title='British_Library/MC_maps_batch_01_(GB_counties)' AND p0.page_namespace=4 GROUP BY cl.cl_to 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...