SQL
AخA
SELECT Pf.page_title, iwl_title
FROM iwlinks
JOIN page Pf ON Pf.page_id=iwl_from
JOIN page Pt ON Pt.page_namespace=0 AND Pt.page_title=CONCAT(UPPER(CONVERT(SUBSTR(iwl_title,1,1) USING latin1)), SUBSTR(iwl_title,2))
WHERE iwl_prefix='wiktionary' AND iwl_title != "" AND LOWER(CONVERT(iwl_title USING latin1)) != LOWER(CONVERT(Pf.page_title USING latin1))
AND LOWER(CONVERT(iwl_title USING latin1)) != LOWER(CONCAT("Special:Search/", CONVERT(Pf.page_title USING latin1)))
AND iwl_title != "Main_Page"
AND Pf.page_title != CONCAT(UPPER(CONVERT(SUBSTR(iwl_title,1,1) USING latin1)), SUBSTR(iwl_title,2), "_(disambiguation)")
AND NOT EXISTS (SELECT * from page_props WHERE pp_page=Pt.page_id AND pp_propname='disambiguation')
AND NOT EXISTS (SELECT * from redirect, page Pr, page_props
WHERE rd_from=Pt.page_id AND rd_namespace=0 AND Pr.page_namespace=0 AND Pr.page_title=rd_title
AND pp_page=Pr.page_id AND pp_propname='disambiguation')
ORDER BY Pf.page_title, iwl_title
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.