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
Chriswolfram
.
Toggle Highlighting
SQL
WITH recursive cat_pages AS ( SELECT * FROM page WHERE page_namespace=14 ), page_hierarchy_1(child_page_id_1, parent_page_id_1) AS ( SELECT cl_from, page_id FROM categorylinks INNER JOIN cat_pages ON cl_to=page_title ), page_hierarchy(child_page_id, parent_page_id) AS ( SELECT child_page_id_1, parent_page_id_1 FROM page_hierarchy JOIN page_hierarchy_1 ON child_page_id=parent_page_id_1 ) # WITH page_hierarchy(child_page_id, parent_page_id) AS ( # SELECT .. # FROM page_hierarchy JOIN page_hierarchy_1 ON page_hierarchy_1.child_page_id= #) SELECT * FROM page_hierarchy_1 LIMIT 30;
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...