Fork of
find template redirects
by Jarekt
This query is marked as a draft
This query has been published
by Jarekt.
SQL
x
select p1.page_title, rd_title, count(tl1.tl_from) as num
from page p1
join linktarget lt1 on lt1.lt_title = p1.page_title and lt1.lt_namespace = 10
join templatelinks tl1 on tl1.tl_target_id = lt1.lt_id
join redirect on rd_from = p1.page_id
where p1.page_namespace = 10 and p1.page_is_redirect = 1
group by page_title
ORDER BY num 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.