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
.
Klappt so nicht! personen die einen Link zu einem Ort in den USA haben, aber nicht die US-Staatsbürgerschaft
Toggle Highlighting
SQL
use dewiki_p; SELECT Person.page_title as Person, Ort.page_title as Ort, cl_to FROM page AS Person, templatelinks, categorylinks, pagelinks, page AS Ort WHERE Person.page_namespace = 0 AND tl_from = Person.page_id AND tl_from_namespace = Person.page_namespace AND tl_namespace = 10 AND tl_title = 'Personendaten' AND pl_from = Person.page_id AND pl_from_namespace = Person.page_namespace AND pl_namespace = 0 AND Ort.page_title = pl_title AND Ort.page_namespace = pl_namespace AND cl_from = Ort.page_id AND cl_to IN (SELECT Cat.page_title FROM page AS Cat, categorylinks WHERE page_namespace = 14 AND cl_from = page_id AND cl_to IN ('Ort_in_den_Vereinigten_Staaten', 'Hauptstadt_in_den_Vereinigten_Staaten', 'City_in_New_York', 'City_in_Wisconsin') ) AND NOT EXISTS (SELECT 1 FROM categorylinks WHERE cl_from = Person.page_id AND cl_to = 'Kategorie:US-Amerikaner' ) LIMIT 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...