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
Wargo
.
Toggle Highlighting
SQL
SET @category := 'Internet'; WITH RECURSIVE subcategories(sbc_title, sbc_depth, sbc_id) AS ( SELECT @category, 0, 0 UNION ALL SELECT page_title, sbc_depth+1, page_id FROM subcategories JOIN categorylinks ON cl_to = sbc_title JOIN page ON cl_from = page_id WHERE cl_type = "subcat" AND sbc_depth <= 5 ) SELECT p.page_title, categorylinks.cl_to FROM page p LEFT JOIN pagelinks l ON (l.pl_namespace = 0 AND l.pl_title = p.page_title) LEFT JOIN page_props prop ON (prop.pp_propname = 'disambiguation' AND prop.pp_page = p.page_id) #LEFT JOIN categorylinks ON (cl_from = p.page_id) JOIN categorylinks ON p.page_id = cl_from JOIN subcategories ON sbc_title = cl_to WHERE p.page_namespace = 0 AND page_is_redirect = 0 AND l.pl_namespace IS NULL AND prop.pp_value IS NULL ORDER BY p.page_title ASC limit 10
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...