SQL
AخA
SELECT Concat("[[Template:", tl_title, "]]") "Template Name",
Count(*) "Transclusions",
Concat("[https://en.wikipedia.org/w/index.php?title=template:", tl_title,
"&action=unprotect change!]") "Change Protection"
FROM page
JOIN templatelinks
ON page_title = tl_title
AND page_namespace = tl_namespace
LEFT JOIN page_restrictions
ON pr_page = page_id
AND ( pr_level = 'sysop'
OR pr_level = 'templateeditor'
OR pr_level = 'extendedconfirmed'
OR pr_level = 'autoconfirmed' )
AND pr_type = 'edit'
WHERE tl_namespace = 10
AND pr_page IS NULL
GROUP BY tl_title
HAVING Count(*) > 250
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.