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
SELECT DISTINCT CONCAT('{','{-r|',REPLACE(Pf.page_title,'_',' '),'}','}') AS Redirect, Pt.page_title AS Target FROM linktarget LTt JOIN templatelinks TLt ON TLt.tl_target_id=LTt.lt_id AND LTt.lt_from_namespace=0 JOIN page Pt ON Pt.page_id=TLt.tl_from JOIN redirect ON rd_namespace=0 AND rd_title=Pt.page_title JOIN page Pf ON Pf.page_id=rd_from AND Pf.page_namespace=0 WHERE LTt.lt_namespace=10 AND LTt.lt_title IN ("Episode_list", "Episode_list/sublist") AND NOT EXISTS (SELECT 1 FROM templatelinks TLf, linktarget LTf WHERE TLf.tl_from=Pf.page_id AND LTf.lt_id=TLf.target_id AND LTf.lt_namespace=10 AND LTf.lt_target IN ("R_from_television_episode", "Television_episode_redirect_handler"))
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...