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
MdsShakil
.
Toggle Highlighting
SQL
SELECT p.page_title AS template_title, p.page_id AS template_id, p.page_namespace AS template_namespace, GROUP_CONCAT(DISTINCT pr.pr_type) AS protection_status, COUNT(*) AS usage_count FROM page AS p JOIN templatelinks AS tl ON tl.tl_from = p.page_id LEFT JOIN page_restrictions AS pr ON pr.pr_page = p.page_id WHERE p.page_namespace = 10 -- Namespace for templates AND tl.tl_namespace = 0 -- Namespace for article pages GROUP BY p.page_title, p.page_id, p.page_namespace ORDER BY usage_count DESC LIMIT 10; -- Specify the number of templates you want to retrieve
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...