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
Ogunoz
.
Toggle Highlighting
SQL
SELECT page.page_id, page.page_title, CategoriesQuery.SubcatLevel1, CategoriesQuery.SubcatLevel2, CategoriesQuery.SubcatLevel3 FROM ( SELECT categorylinks.cl_from, page.page_title as SubcatLevel3, LEVEL2.SubcatLevel2 as SubcatLevel2, LEVEL2.SubcatLevel1 as SubcatLevel1 FROM ( SELECT categorylinks.cl_from, page.page_title as SubcatLevel2, LEVEL1.SubCat as SubcatLevel1 FROM ( SELECT categorylinks.cl_from, categorylinks.cl_to, categorylinks.cl_type, page.page_title as SubCat FROM categorylinks INNER JOIN page ON categorylinks.cl_from=page.page_id WHERE cl_to = 'Mathematics' AND categorylinks.cl_type = 'subcat' LIMIT 500 ) AS LEVEL1 INNER JOIN categorylinks ON categorylinks.cl_to = LEVEL1.Subcat INNER JOIN page ON categorylinks.cl_from=page.page_id WHERE categorylinks.cl_type = 'subcat' LIMIT 500 ) AS LEVEL2 INNER JOIN categorylinks ON categorylinks.cl_to = LEVEL2.SubcatLevel2 INNER JOIN page ON categorylinks.cl_from=page.page_id WHERE categorylinks.cl_type = 'subcat' LIMIT 10000 ) AS CategoriesQuery INNER JOIN categorylinks ON categorylinks.cl_to = CategoriesQuery.SubcatLevel1 OR categorylinks.cl_to = CategoriesQuery.SubcatLevel2 OR categorylinks.cl_to = CategoriesQuery.SubcatLevel3 OR categorylinks.cl_to = 'Mathematics' INNER JOIN page ON categorylinks.cl_from=page.page_id WHERE categorylinks.cl_type = 'page' LIMIT 100
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...