Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
Fork of
Candidates to be linked from disambiguations on cswiki (redlinks)
by
Matěj Suchánek
This query is marked as a draft
This query has been published
by
Matěj Suchánek
.
Toggle Highlighting
SQL
USE cswiki_p; SELECT disambigs.page_title AS d, allpages.page_title AS t FROM page_props JOIN page AS disambigs ON disambigs.page_id = pp_page JOIN page AS allpages #SELECT pl_title AS title FROM pagelinks AS alllinks WHERE alllinks.pl_namespace = 0 WHERE pp_propname = 'disambiguation' AND allpages.page_namespace = 0 AND allpages.page_title LIKE CONCAT(SUBSTRING_INDEX(disambigs.page_title, '_(', 1), '\\_%') AND allpages.page_title <> disambigs.page_title AND NOT EXISTS ( SELECT 1 FROM pagelinks WHERE pl_from = pp_page AND pl_namespace = 0 AND ( pl_title = allpages.page_title OR pl_title IN ( SELECT redirects.page_title FROM redirect JOIN page AS redirects ON page_id = rd_from WHERE rd_title = allpages.page_title AND rd_namespace = 0 ) OR pl_title IN (SELECT rd_title FROM redirect WHERE rd_from = allpages.page_id) ) ) LIMIT 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...