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
DannyS712
.
Toggle Highlighting
SQL
use enwikinews_p; SELECT CONCAT ( CASE WHEN tl.tl_namespace = 10 THEN 'Template' WHEN tl.tl_namespace = 828 THEN 'Module' END, ':', tl.tl_title ) AS 'Page', COUNT(*) AS 'Transclusions', CASE WHEN COUNT(*) < 100 THEN CONCAT( SUBSTR(COUNT(*), 1, LENGTH(COUNT(*)) - 1), 0 ) ELSE 'More' END AS 'Over' FROM templatelinks tl WHERE tl.tl_title IN ( SELECT SUBSTR(pg.page_title, 1, LENGTH(pg.page_title) - 18) FROM page pg WHERE pg.page_title LIKE '%/doc/use-count/doc' AND pg.page_id IN ( SELECT cl.cl_from FROM categorylinks cl WHERE cl.cl_to = 'Possible-risk/use-count' ) ) AND tl.tl_namespace IN ( 10, 828 ) GROUP BY CONCAT( tl.tl_title, tl.tl_namespace ) ORDER BY COUNT(*) 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...