SQL
AخA
SELECT cl_from, page.page_title, COUNT(templatelinks.tl_from) FROM categorylinks
LEFT JOIN page ON page_id = cl_from
LEFT JOIN templatelinks ON tl_title = page_title
WHERE cl_to = 'Wikipedia_substituted_templates'
AND page_namespace = 10
AND cl_from NOT IN (SELECT cl_from FROM categorylinks WHERE cl_to = 'Wikipedia_templates_to_be_automatically_substituted')
AND tl_namespace = 10
GROUP BY cl_from
LIMIT 3
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.