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
Mackensen
.
Links to disambiguation pages on the English Wikipedia from articles managed by WikiProject Trains. Derived from https://quarry.wmcloud.org/query/1632.
Toggle Highlighting
SQL
SELECT DISTINCT page1.page_title AS title FROM page as page1 JOIN pagelinks ON page1.page_id = pagelinks.pl_from AND page1.page_namespace = 0 JOIN page AS page2 ON pagelinks.pl_namespace = page2.page_namespace AND pagelinks.pl_title = page2.page_title JOIN categorylinks ON page2.page_id = categorylinks.cl_from AND categorylinks.cl_to = 'Disambiguation_pages' AND NOT EXISTS (SELECT * FROM categorylinks AS cl1 WHERE cl1.cl_from = page1.page_id AND cl1.cl_to = 'Disambiguation_pages') AND NOT page2.page_title LIKE "%_(disambiguation)" AND page1.page_is_redirect = 0 AND EXISTS (SELECT 1 FROM templatelinks as tl1 WHERE tl1.tl_from = page2.page_id AND tl1.tl_namespace = 10 AND tl1.tl_title = 'WikiProject_Trains')
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...