SQL
x
USE skwiki_p;
SELECT
REPLACE(REGEXP_REPLACE(page_title, '^[^()]+(\\([^()]+\\))$', '\\1'), '_', ' ') AS suffix,
COUNT(*) AS count
FROM
page
WHERE
page_namespace = 0 AND
page_title RLIKE '^[^()]+\\([^()]+\\)$'
GROUP BY
suffix
ORDER BY
count DESC, suffix
;
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.