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
.
List disambiguation pages with incoming links from namespace 0, ordered by link count (highest first)
Toggle Highlighting
SQL
WITH dabs_and_redirects AS ( WITH dabs AS ( SELECT page_title AS dab FROM categorylinks JOIN page ON page_id=cl_from AND page_namespace=0 AND page_title NOT LIKE "%_(disambiguation)" WHERE cl_to="All_disambiguation_pages" AND cl_type='page' ) SELECT dab FROM dabs UNION SELECT page_title FROM dabs JOIN redirect ON rd_namespace=0 AND rd_title=dab JOIN page ON page_id=rd_from AND page_namespace=0 AND page_title NOT LIKE "%_(disambiguation)" WHERE cl_to="All_disambiguation_pages" AND cl_type='page' ) SELECT dab, COUNT(*) AS links FROM dabs_and_redirects JOIN pagelinks ON pl_namespace=0 AND pl_title=dab AND pl_from_namespace=0 JOIN page ON page_id=pl_from AND page_namespace=0 AND page_is_redirect=0 GROUP BY dab ORDER BY links DESC
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...