SQL
AخA
SELECT lt.lt_title AS Target, COUNT(IF(page_title IS NULL, 1, NULL)) AS LinkCount
FROM pagelinks pl
(LEFT OUTER JOIN templatelinks tl ON pl.pl_target_id = tl.tl_target_id WHERE tl.tl_target_id IS NULL)
INNER JOIN linktarget lt ON pl.pl_target_id = lt.lt_id
LEFT JOIN page ON page_namespace = 0 AND page_title = lt.lt_title
WHERE pl_from_namespace = 0 AND lt.lt_namespace = 0
-- Exclude some results from templates: United states elections, years in Ireland and France, some classifications of bacteria
-- AND lt.lt_title NOT LIKE '%_United_States_elections%' AND lt.lt_title NOT LIKE '%_in_Ireland%' AND lt.lt_title NOT LIKE '%_in_France%' AND lt.lt_title NOT LIKE '%bacteriota%'AND lt.lt_title NOT LIKE '%bacterota%'
GROUP BY Target
HAVING LinkCount > 500
ORDER BY LinkCount DESC
LIMIT 100;
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.