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
Wurgl
.
Toggle Highlighting
SQL
WITH RECURSIVE Cat AS (SELECT page_title, page_id FROM page WHERE page_title = 'Person_nach_Geschlecht' AND page_namespace = 14 UNION SELECT SubCat.page_title, SubCat.page_id FROM page AS SubCat, categorylinks, Cat WHERE SubCat.page_namespace = 14 AND cl_from = SubCat.page_id AND cl_to = Cat.page_title AND cl_type = 'subcat' ), Cat2 AS (SELECT page_title, page_id FROM page WHERE page_title IN ('Biblische_Person', 'Fiktive_Person') AND page_namespace = 14 UNION SELECT SubCat.page_title, SubCat.page_id FROM page AS SubCat, categorylinks, Cat2 WHERE SubCat.page_namespace = 14 AND cl_from = SubCat.page_id AND cl_to = Cat2.page_title AND cl_type = 'subcat' ) SELECT page.page_title, page.page_is_redirect AS "Redir", GROUP_CONCAT(CL.cl_to ORDER BY CL.cl_to SEPARATOR ' ') AS "Kategorien" FROM categorylinks AS C, categorylinks AS CL, Cat, page LEFT JOIN (templatelinks, linktarget) ON tl_from = page.page_id AND tl_target_id = lt_id AND lt_title = 'Personendaten' AND lt_namespace = 10 LEFT JOIN (categorylinks AS C2, Cat2) ON C2.cl_from = page.page_id AND C2.cl_to = Cat2.page_title WHERE page.page_id = C.cl_from AND page.page_namespace = 0 AND C.cl_to = Cat.page_title AND tl_from IS NULL AND C2.cl_from IS NULL AND page.page_id = CL.cl_from AND CL.cl_to != C.cl_to AND CL.cl_to NOT LIKE 'Wikipedia:%' AND CL.cl_to NOT LIKE 'MediaWiki:%' AND CL.cl_to NOT IN ('Frauen', 'Männer') GROUP BY page.page_title
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...