Fork of Untitled query #15910 by Steinsplitter
This query is marked as a draft This query has been published by IKhitron.

SQL

x
 
use hewiki_p;
select page_id, pr_level, tl_namespace, tl_title, count(tl_from) from templatelinks join page
on page_title = tl_title
and page_namespace = tl_namespace
join page_restrictions
on page_id = pr_page
where tl_from_namespace = 0
and pr_type = "edit"
group by tl_title
having count(tl_from) >= 10000
order by count(tl_from) desc;
select page_id, tl_namespace, tl_title, count(tl_from) from templatelinks join page
on page_title = tl_title
and page_namespace = tl_namespace
where tl_from_namespace = 0
and not exists
(select * from page_restrictions
 where page_id = pr_page
 and pr_type = "edit")
group by tl_title
having count(tl_from) >= 10000
order by count(tl_from) 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.

Checking query status...