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, page_id, sub.pl_title FROM ( SELECT DISTINCT SUBSTRING_INDEX(pl_title, '_(', 1) AS title, pl_title, pl_namespace FROM pagelinks WHERE pl_title LIKE '%&_(%)' ESCAPE '&' AND pl_namespace = 0 ) AS sub JOIN page ON page_title = title AND page_namespace = pl_namespace JOIN page_props ON pp_page = page_id LEFT JOIN pagelinks AS dlinks ON dlinks.pl_from = page_id AND dlinks.pl_namespace = sub.pl_namespace AND dlinks.pl_title = sub.pl_title WHERE pp_propname = 'disambiguation' /*AND NOT EXISTS ( SELECT 1 FROM pagelinks AS dlinks WHERE dlinks.pl_from = page_id AND dlinks.pl_namespace = sub.pl_namespace AND dlinks.pl_title = sub.pl_title )*/ LIMIT 1; #ORDER BY page_title;
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...