SQL
AخA
SELECT
CONCAT("Template:", REPLACE(tl_title, "_", " ")) AS "Unprotected template",
count(*) AS "Uses"
FROM
templatelinks
INNER JOIN page ON page.page_namespace = 10 AND page.page_title = templatelinks.tl_title
WHERE
tl_namespace = 10
AND page.page_id NOT IN (SELECT pr_page FROM page_restrictions WHERE pr_type IN ("edit", "move", "upload"))
GROUP BY
tl_title
HAVING
count(*) > 500
ORDER BY
count(*) DESC
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.