SQL
x
USE enwiki_p; -- articles from EN with most langlinks...
SELECT
count(*) ll_count,
CONCAT("[[:en:",page_title,"]]") title_en,
(select CONCAT("[[:de:",ll_title,"]]") from langlinks where ll_from = page_id and ll_lang = 'de') title_de,
(select CONCAT("[[:es:",ll_title,"]]") from langlinks where ll_from = page_id and ll_lang = 'es') title_es,
(select CONCAT("[[:fr:",ll_title,"]]") from langlinks where ll_from = page_id and ll_lang = 'fr') title_fr,
(select CONCAT("[[:sv:",ll_title,"]]") from langlinks where ll_from = page_id and ll_lang = 'sv') title_sv,
(select CONCAT("[[:d:",pp_value,"]]") from page_props where pp_page = page_id and pp_propname = 'wikibase_item') wb_item
FROM
page, langlinks
WHERE
ll_from = page_id and
(select count(*) from langlinks where ll_from = page_id) >= 50 and
-- attempt to limit number of intermediate rows to fetch and sort
page_id not in (select ll_from from langlinks where ll_lang = 'lt') and
-- ... missing from LT (no direct iw equivalent there)
page_namespace = 0
GROUP BY
page_id
ORDER BY
ll_count desc, page_title
LIMIT
2050; -- top N
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.