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
BilledMammal
.
Toggle Highlighting
SQL
WITH RECURSIVE get_name_dabs (page_title, page_id, page_namespace, inc, parent_title, parent_namespace) AS ( ( SELECT page_title, page_id, page_namespace, 1, page_title, page_namespace FROM page WHERE page_title IN ("Set index articles", "All_disambiguation_pages", "Lists") AND page_namespace = 14 ) UNION ( SELECT child.page_title, child.page_id, child.page_namespace, inc + 1, parent.page_title, parent.page_namespace FROM page AS child JOIN categorylinks as childLinks ON child.page_id = childLinks.cl_from JOIN get_name_dabs AS parent ON childLinks.cl_to = parent.page_title LEFT JOIN page_props ON childLinks.cl_from = pp_page AND pp_propname = "hiddencat" WHERE (child.page_namespace = 14 OR child.page_namespace = 0) AND child.page_is_redirect = 0 AND parent.page_namespace = 14 AND pp_propname IS NULL AND inc < 4 ) ), article AS ( SELECT * FROM page LEFT JOIN categorylinks ON page_id = cl_from AND cl_to IN ("Surnames", "Given_names") OR cl_to LIKE "Db-%" WHERE page_namespace = 0 AND cl_to IS NULL AND page_id NOT IN (SELECT DISTINCT(page_id) FROM get_name_dabs WHERE page_namespace = 0) ) SELECT COUNT(*), FLOOR(page_len / 1000) as lenrange FROM article LEFT JOIN categorylinks ON page_id = cl_from AND cl_to = "All_disambiguation_pages" WHERE page_namespace = 0 AND page_is_redirect = 0 AND cl_to IS NULL GROUP BY lenrange
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...