Fork of
Possible partially disambiguated titles
by Certes
This query is marked as a draft
This query has been published
by Certes.
SQL
x
SELECT MIN(page_title) AS title1, MAX(page_title) AS title2, REGEXP_REPLACE(page_title, ".*?\\((\\w+).*", "\\1") AS qualifier,
SUBSTRING_INDEX(page_title, '(', 1) AS basename, COUNT(*) AS N
FROM page
WHERE page_title LIKE "A%" AND page_title LIKE "Ab%(%)" AND page_is_redirect=0
GROUP BY basename, qualifier
HAVING SUM(page_title = CONCAT(basename, "(", qualifier, ")"))=1 AND N>1
By running queries you agree to the Cloud Services Terms of Use and you irrevocably agree to release your SQL under CC0 License.
All SQL code is licensed under CC0 License.