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
BrandonXLF
.
Toggle Highlighting
SQL
/* SELECT page_title FROM ( SELECT tl_from AS A, tl_title AS B, target.page_id AS C FROM templatelinks JOIN page AS target ON target.page_title = tl_title AND target.page_namespace = tl_namespace JOIN redirect ON rd_from = target.page_id AND rd_namespace = 10 AND rd_title = "Infobox_settlement" UNION SELECT tl_from AS A, NULL AS B, tl_from AS C FROM templatelinks WHERE tl_namespace = 10 AND tl_title = "Infobox_settlement" ) `temp-backlinks-whatever` JOIN page ON page_id = A ORDER BY C, B LIMIT 501 */ SELECT direct_from, indirect_from FROM ( SELECT CASE WHEN rd_from IS NOT NULL THEN direct_from ELSE tl_from AS direct_from, indirect_from, page_title FROM templatelinks LEFT JOIN ( SELECT tl_from AS indirect_from, rd_from FROM templatelinks JOIN page ON page_title = tl_title AND page_namespace = tl_namespace JOIN redirect ON rd_from = page_id AND rd_namespace = 10 AND rd_title = "Template_link" ) AS `temp` ON indirect_from = tl_from ) AS `temp2` JOIN page ON page_id = tl_from WHERE tl_namespace = 10 AND tl_title = "Template_link" AND direct_from >= 66733012 ORDER BY direct_from, indirect_from 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...