Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
This query is marked as a draft
This query has been published
by
IKhitron
.
Toggle Highlighting
SQL
select template, counter, if(id = null, 'fgh', ifnull(pr_level, 'none')) as protection from (select template, counter, page_id as id from (select tl_title as template, count(tl_from) as counter from templatelinks where tl_from_namespace = 0 and tl_namespace = 10 group by tl_title order by count(tl_from) asc limit 100) t0 left join page on page_namespace = 10 and page_title = template) t1 left join page_restrictions on pr_page = id and pr_type = 'edit'; select template, counter, ifnull(page_id, -1) as id from (select tl_title as template, count(tl_from) as counter from templatelinks where tl_from_namespace = 0 and tl_namespace = 10 group by tl_title order by count(tl_from) asc limit 100) t0 left join page on page_namespace = 10 and page_title = template; select * from page_restrictions where pr_page = -1 limit 10
By running queries you agree to the
Cloud Services Terms of Use
and you irrevocably agree to release your SQL under
CC0 License
.
Submit Query
Stop Query
All SQL code is licensed under
CC0 License
.
Checking query status...