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 WHERE pp_propname = 'disambiguation' AND allpages.page_namespace = 0 AND allpages.page_title LIKE CONCAT(REPLACE(SUBSTRING_INDEX(disambigs.page_title, '_(rozcestník)', 1), '_', '#_'), '#_(%)') ESCAPE '#' AND allpages.page_is_redirect = 0 AND allpages.page_title <> disambigs.page_title #AND allpages.page_title NOT IN (SELECT pl_title FROM pagelinks WHERE pl_from = pp_page AND pl_namespace = 0) AND allpages.page_title NOT IN ( SELECT rd_title FROM pagelinks JOIN page AS outlinks ON outlinks.page_title = pl_title AND outlinks.page_namespace = pl_namespace JOIN redirect ON rd_from = outlinks.page_id WHERE pl_from = pp_page AND pl_namespace = 0 AND rd_namespace = 0 UNION SELECT pl_title FROM pagelinks WHERE pl_from = pp_page AND pl_namespace = 0 ) LIMIT 500; /*/ SELECT disambigs.page_title AS d, allpages.page_title AS t FROM page AS allpages JOIN page AS disambigs JOIN page_props ON pp_page = disambigs.page_id WHERE pp_propname = 'disambiguation' AND allpages.page_namespace = 0 AND allpages.page_is_redirect = 0 AND disambigs.page_title IN ( SUBSTRING_INDEX(allpages.page_title, '_(', 1), CONCAT(SUBSTRING_INDEX(allpages.page_title, '_(', 1), '_(rozcestník)') ) AND allpages.page_title <> disambigs.page_title #AND allpages.page_title NOT IN (SELECT pl_title FROM pagelinks WHERE pl_from = pp_page AND pl_namespace = 0) AND allpages.page_title NOT IN ( SELECT rd_title FROM pagelinks JOIN page AS outlinks ON outlinks.page_title = pl_title AND outlinks.page_namespace = pl_namespace JOIN redirect ON rd_from = outlinks.page_id WHERE pl_from = pp_page AND pl_namespace = 0 AND rd_namespace = 0 UNION SELECT pl_title FROM pagelinks WHERE pl_from = pp_page AND pl_namespace = 0 ) 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...