SQL
x
SELECT
t.page_id AS template_id,
t.page_title AS template_title,
p.page_id AS usage_id,
p.page_title AS usage_title,
p.page_namespace AS usage_namespace
FROM page AS t
JOIN templatelinks AS l
ON l.tl_target_id = t.page_id
JOIN page AS p
ON p.page_id = l.tl_from
WHERE t.page_namespace = 10
GROUP BY t.page_id, p.page_id
HAVING COUNT(*) = 1
ORDER BY t.page_title;
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.