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 = 'Vorlage:Navigationsleiste_Verwaltungsgliederung_(Vereinigte_Staaten)' 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' ), OCat AS (SELECT page_title, page_id FROM page WHERE page_title = 'Ort_in_den_Vereinigten_Staaten' AND page_namespace = 14 UNION SELECT SubCat.page_title, SubCat.page_id FROM page AS SubCat, categorylinks, OCat WHERE SubCat.page_namespace = 14 AND cl_from = SubCat.page_id AND cl_to = OCat.page_title AND cl_type = 'subcat' ) SELECT CONCAT('[[', REPLACE(Ort.page_title, '_', ' '), ']]') AS "Ort in Vereinigten Staaten", REPLACE(Navi.page_title, '_', ' ') AS "Mögliche Navigationsleiste" FROM page AS Navi, pagelinks, page AS Ort, Cat, categorylinks AS Cl, OCat, categorylinks AS OCl WHERE Ort.page_namespace = 0 AND Navi.page_namespace = 10 AND Cat.page_title = Cl.cl_to AND Cl.cl_from = Navi.page_id AND Navi.page_title LIKE "Navi%leiste%" AND pl_from = Navi.page_id AND pl_title = Ort.page_title AND pl_namespace = Ort.page_namespace AND Ort.page_is_redirect = 0 AND OCat.page_title = OCl.cl_to AND OCl.cl_from = Ort.page_id AND Ort.page_title NOT IN ('Census-designated_place', 'County_Seat') AND Ort.page_title NOT LIKE "Liste\\_%" AND NOT EXISTS (SELECT 1 FROM templatelinks, linktarget WHERE tl_from = Ort.page_id AND tl_target_id = lt_id AND lt_title = Navi.page_title AND lt_namespace = Navi.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...