SQL
x
/*
select lt_namespace, lt_title, group_concat(page_title separator ','), count(page_id) as links from templatelinks
join linktarget on lt_id = tl_target_id -- and lt_namespace in (10, 828)
-- and lt_namespace = 828 and lt_title = 'Citation/CS1'
-- and lt_namespace = 10 and lt_title like 'Cite\_%'
-- and lt_namespace = 828 and lt_title = 'Lang'
and lt_namespace = 10 and lt_title like 'Lang-%'
join page on page_id = tl_from and page_namespace = 0 and tl_from_namespace = 0
where page_id in (
select cl_from from categorylinks
where cl_to = 'All_disambiguation_pages' and cl_type = 'page'
)
group by tl_target_id
having links < 4
order by links desc
*/
/*
select distinct page_title from templatelinks
join linktarget on lt_id = tl_target_id and lt_namespace = 10 and lt_title like 'Lang-%'
join page on page_id = tl_from and page_namespace = 0 and tl_from_namespace = 0
where page_id in (
select cl_from from categorylinks
where cl_to = 'All_disambiguation_pages' and cl_type = 'page'
)
*/
select count(*) from page
join redirect on page_id = rd_from and rd_namespace = 10
where page_namespace = 10 and page_title like 'Lang-%'
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.