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
Solidest
.
Toggle Highlighting
SQL
SELECT p.page_title as template_name, COUNT(DISTINCT pl.pl_target_id) as total_links, SUM(CASE WHEN p2.page_id IS NULL THEN 1 ELSE 0 END) as red_links, ROUND(SUM(CASE WHEN p2.page_id IS NULL THEN 1 ELSE 0 END) * 100.0 / COUNT(DISTINCT pl.pl_target_id), 2) as red_links_percentage FROM templatelinks tl JOIN page p ON tl.tl_from = p.page_id LEFT JOIN pagelinks pl ON pl.pl_from = tl.tl_from LEFT JOIN page p2 ON p2.page_id = pl.pl_target_id WHERE tl.tl_from_namespace = 10 -- Пространство имён шаблонов GROUP BY p.page_title HAVING total_links > 0 AND red_links = total_links ORDER BY total_links DESC LIMIT 100;
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...