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
Certes
.
Toggle Highlighting
SQL
SET STATEMENT max_statement_time = 60 FOR SELECT Pt.page_title, pl_from_namespace, Pf.page_title FROM templatelinks JOIN page Pt ON page_namespace = 0 AND page_id = tl_from /* Surname linked to */ JOIN pagelinks PL ON pl_namespace = 0 AND pl_title = Pt.page_title JOIN page Pf ON Pf.page_id = PL.pl_from /* Page linked from */ WHERE tl_namespace = 10 AND tl_title = "Surname" AND pl_from_namespace IN (0,6,10,14,100,828) AND page_title LIKE "Ant%" AND pl_title LIKE "Ant%" AND NOT EXISTS (SELECT 1 FROM categorylinks WHERE cl_from = PL.pl_from AND cl_to = "Surnames") AND NOT EXISTS (SELECT 1 FROM templatelinks WHERE tl_from = PL.pl_from AND tl_namespace = 10 AND tl_title = "Surname") AND NOT EXISTS (SELECT 1 FROM templatelinks WHERE tl_from = PL.pl_from AND tl_namespace = 10 AND tl_title = "All_disambiguation_pages") AND NOT EXISTS (SELECT 1 FROM templatelinks JOIN page ON page_namespace = 10 AND page_title = tl_title JOIN pagelinks ON pl_from = page_id AND pl_namespace = 0 AND pl_title = PL.pl_title WHERE tl_from = PL.pl_from AND tl_namespace = 10) ORDER BY Pt.page_title, pl_from_namespace, Pf.page_title
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...