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
BilledMammal
.
Toggle Highlighting
SQL
WITH targets AS (SELECT DISTINCT(page_title) as target_title, page_id AS target_id FROM page WHERE page_namespace = 1 AND page_is_redirect = 0 AND (SUBSTRING_INDEX(page_title, '/', 1) IN ( SELECT page_title FROM page JOIN categorylinks AS israel ON page_id = israel.cl_from AND israel.cl_to = "WikiProject_Israel_articles" JOIN categorylinks AS palestine ON page_id = palestine.cl_from AND palestine.cl_to = "WikiProject_Palestine_articles" WHERE page_namespace = 1 AND page_is_redirect = 0 ) OR SUBSTRING_INDEX(page_title, '/', 1) IN ( SELECT DISTINCT(page_title) FROM page JOIN templatelinks ON tl_from = page_id JOIN linktarget ON tl_target_id = lt_id WHERE page_namespace = 1 AND page_is_redirect = 0 AND lt_title in ('ArbCom_Arab-Israeli_enforcement', 'Contentious_topics/Arab-Israeli_talk_notice') AND lt_namespace = 10 AND tl_from_namespace = 1 ))) SELECT page_title, target_title FROM page JOIN pagelinks ON pl_from = page_id JOIN linktarget ON pl_target_id = lt_id JOIN targets ON lt_title = target_title WHERE page_namespace = 1 AND page_is_redirect = 1 AND pl_from_namespace = 1 AND lt_namespace = 1
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...