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
Gerges
.
Toggle Highlighting
SQL
SELECT main.page_title, COUNT(*) - 1 as sub_page_count, (SELECT COUNT(*) FROM pagelinks WHERE pl_title = main.page_title and pl_from_namespace = 0 and pl_namespace = 100) as links_count FROM page AS p INNER JOIN ( SELECT page_title FROM page WHERE page_namespace = 100 AND page_is_redirect = 0 )AS main ON main.page_title = SUBSTRING_INDEX(p.page_title, '/', 1) WHERE p.page_namespace = 100 GROUP BY main.page_title order by links_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...