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, Cat WHERE SubCat.page_namespace = 14 AND cl_from = SubCat.page_id AND cl_to = Cat.page_title AND cl_type = 'subcat' ) SELECT Ort.page_title, Navi.page_title 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 = Navi.page_id /*AND Ort.page_title NOT IN ('County_(Vereinigte_Staaten)', 'Bundesstaat_der_Vereinigten_Staaten', 'Metropolitan_Statistical_Area', 'Census-designated_place', 'City_(Vereinigte_Staaten)', 'Town_(Vereinigte_Staaten)', 'Township_(Vereinigte_Staaten)', 'County_Seat', 'Village_(Vereinigte_Staaten)', 'Unincorporated_Community', 'Gemeindefreies_Gebiet', 'Indianerreservat', 'Geisterstadt', 'Virginia', 'Oregon', 'Pennsylvania', 'Florida', 'Texas', 'South_Carolina', 'North_Carolina', 'New_Hampshire', 'Nevada', 'New_York_(Bundesstaat)', 'Wisconsin', 'Alabama', 'Vermont', 'Alaska', 'Connecticut', 'Colorado', 'Iowa', 'Utah', 'Arizona', 'Arkansas', 'Delaware', 'Georgia', 'Hawaii', 'Kalifornien', 'Indiana', 'Maine', 'Kentucky', 'Kansas', 'Ohio', 'Idaho', 'Illinois', 'Missouri', 'Mississippi_(Bundesstaat)', 'Massachusetts', 'Maryland' ) AND Navi.page_title != CONCAT('Navigationsleiste_Orte_im_', Ort.page_title) 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...