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
Gerges
.
Toggle Highlighting
SQL
SELECT REPLACE(t1.page_title, '_', ' ') AS redirect_template_page, REPLACE(r.rd_title, '_', ' ') AS template_page, t2.page_title AS linked_page FROM page AS t1 JOIN redirect AS r ON t1.page_id = r.rd_from JOIN page AS t2 ON r.rd_title = t2.page_title JOIN templatelinks AS tl ON t2.page_id = tl.tl_from JOIN linktarget AS lt ON tl.tl_target_id = lt.lt_id WHERE t1.page_namespace = 10 AND t1.page_title = SUBSTRING_INDEX(t1.page_title, '/', 1) AND r.rd_namespace = 10 AND lt_namespace = 10 AND t2.page_namespace = 0 AND lt.lt_title = t1.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...