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
Matěj Suchánek
.
Toggle Highlighting
SQL
USE cswiki_p; /* SELECT page_title FROM page_props AS PP JOIN page AS P ON PP.pp_page = P.page_id WHERE PP.pp_propname = 'disambiguation' AND EXISTS ( SELECT 1 FROM page AS other WHERE other.page_namespace = P.page_namespace AND other.page_title = CONCAT(P.page_title, '_(rozcestník)') AND other.page_is_redirect = 0 ); */ SELECT page_title FROM page AS second JOIN page_props ON pp_page = second.page_id AND pp_propname = 'wikibase_item' JOIN wikidatawiki_p.wbt_text ON wbx_text = REPLACE(SUBSTRING_INDEX(second.page_title, '_(', 1), '_', ' ') JOIN wbt_text_in_lang ON wbx_id = wbxl_text_id JOIN wbt_term_in_lang ON wbtl_text_in_lang_id = wbxl_id JOIN wbt_item_terms ON wbit_term_in_lang_id = wbtl_id WHERE wbtl_type_id IN (1,3) AND CONCAT('Q', wbit_item_id) <> pp_value AND second.page_title LIKE '%\_(%)' AND second.page_title NOT LIKE '%)%)' AND second.page_namespace = 0 AND second.page_is_redirect = 0 AND NOT EXISTS ( SELECT 1 FROM page AS prim WHERE prim.page_namespace = second.page_namespace AND prim.page_title = SUBSTRING_INDEX(second.page_title, '_(', 1) ) AND second.page_title NOT LIKE 'Seznam\_kulturních\_památek%' 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...