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
Bdijkstra
.
Toggle Highlighting
SQL
SELECT c.page_title AS page_title, GROUP_CONCAT(cl1.cl_to SEPARATOR '\n') AS 'a-cats' FROM (page c LEFT JOIN categorylinks cl3 ON cl3.cl_from=c.page_id), (page a LEFT JOIN categorylinks cl1 ON cl1.cl_from=a.page_id) WHERE c.page_namespace=14 AND a.page_namespace=0 AND c.page_title=a.page_title AND a.page_is_redirect=0 AND NOT EXISTS (SELECT * FROM categorylinks cl2 WHERE cl2.cl_from=a.page_id AND cl2.cl_to=a.page_title) AND NOT EXISTS (SELECT * FROM page_props WHERE pp_page=a.page_id AND pp_propname='disambiguation') GROUP BY c.page_title, a.page_namespace
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...