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
Certes
.
Toggle Highlighting
SQL
SET STATEMENT max_statement_time=600 FOR SELECT Pd.page_title AS dab, SUM(CASE WHEN EXISTS (SELECT 1 FROM categorylinks WHERE cl_from = Pp.page_id AND (cl_to = "Living_people" OR cl_to REGEXP "^\\d+_(BC_)?(births|deaths)")) THEN 1 ELSE 0 END) AS people, SUM(CASE WHEN EXISTS (SELECT 1 FROM categorylinks WHERE cl_from = Pp.page_id AND (cl_to = "Living_people" OR cl_to REGEXP "^\\d+_(BC_)?(births|deaths)")) THEN 0 ELSE 1 END) AS nonpeople FROM categorylinks Cd JOIN page Pd ON Pd.page_id = Cd.cl_from AND Pd.page_namespace = 0 AND Pd.page_title REGEXP "^[^_]+(_\\(disambiguation\\))?$" JOIN pagelinks ON pl_from = cl_from AND pl_namespace = 0 JOIN page Pp ON Pp.page_namespace = 0 AND Pp.page_title = pl_title WHERE Cd.cl_to = "All_disambiguation_pages" AND Cd.cl_type = "page" GROUP BY dab HAVING people >= 20 AND nonpeople >= 10 ORDER BY people DESC, nonpeople DESC, dab
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...