Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
Fork of
Weiterleitungen mit PD ohne Mann/Frau-Kategorie
by
Wurgl
This query is marked as a draft
This query has been published
by
Wurgl
.
Schweizer Orte mit Kanton-Kürzel, die einen Rotlink erzeugen und für welche eine Nicht-Begriffsklärungsseite ohne dieses Kürzel existiert.
Toggle Highlighting
SQL
USE dewiki_p; SELECT STRAIGHT_JOIN src.page_title, pl_title, SUBSTR(pl_title, 1, LENGTH(pl_title) - 3) AS "vorh. Ziel" FROM pagelinks, page AS src WHERE src.page_id = pl_from AND pl_from_namespace = 0 AND pl_title < 'M' AND pl_title REGEXP "_(ZH|BE|LU|UR|SZ|OW|NW|GL|ZG|FR|SO|BS|BL|SH|AR|AI|SG|GR|AG|TG|TI|VD|VS|NE|GE|JU)$" AND pl_namespace = 0 AND NOT EXISTS (SELECT 1 FROM page WHERE page_namespace = pl_namespace AND page_title = pl_title ) AND EXISTS (SELECT 1 FROM page AS target WHERE target.page_namespace = pl_namespace AND target.page_title = SUBSTR(pl_title, 1, LENGTH(pl_title) - 3) AND target.page_id != src.page_id AND NOT EXISTS (SELECT 1 FROM templatelinks WHERE tl_from = target.page_id AND tl_title = 'Begriffsklärung' AND tl_namespace = 10 ) )
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...