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
Hasley
.
Toggle Highlighting
SQL
/* Based on https://quarry.wmcloud.org/query/68671. */ WITH unprotected_templates AS ( SELECT lt_id, lt_title FROM linktarget WHERE lt_namespace = 10 ) SELECT lt_title, COUNT(tl_from) FROM templatelinks tl INNER JOIN page ON (page_restrictions.pr_page = page.page_id) INNER JOIN unprotected_templates ON (tl.tl_target_id = tt.lt_id) INNER JOIN page_restrictions ON (page_restrictions.pr_page = page.page_id) WHERE NOT EXISTS ( SELECT 1 FROM page_restrictions WHERE page_restrictions.pr_page = page_id AND page_restrictions.pr_level = 'sysop' AND page_restrictions.pr_type = 'edit' AND page_restrictions.pr_expiry = 'infinity' ) GROUP BY lt_title HAVING COUNT(*) > 5000 ORDER BY num_links DESC;
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...