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
WITH template_links AS ( SELECT tl_from_id, tl_target_id, COUNT(DISTINCT pl.pl_title) as total_links, SUM(CASE WHEN p2.page_id IS NULL THEN 1 ELSE 0 END) as red_links FROM templatelinks tl JOIN page p ON tl.tl_from_id = p.page_id LEFT JOIN pagelinks pl ON pl.pl_from = tl.tl_from_id LEFT JOIN page p2 ON pl.pl_namespace = p2.page_namespace AND pl.pl_title = p2.page_title WHERE tl.tl_target_text LIKE 'Навигация%' GROUP BY tl_from_id, tl_target_id ) SELECT p.page_title as template_name, tl.total_links, tl.red_links, ROUND(tl.red_links * 100.0 / tl.total_links, 2) as red_links_percentage FROM template_links tl JOIN page p ON tl.tl_from_id = p.page_id WHERE tl.red_links = tl.total_links AND tl.total_links > 0 ORDER BY tl.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...