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
LD
.
Toggle Highlighting
SQL
SELECT lt.lt_title as titre, COUNT(*) as nb_inclusion_directes, SUM(CASE WHEN p2.page_namespace = 10 THEN 1 ELSE 0 END) as nb_inclusion_indirectes FROM templatelinks t INNER JOIN linktarget lt ON lt.lt_id = t.tl_target_id LEFT JOIN page p ON p.page_namespace = lt.lt_namespace AND p.page_title = lt.lt_title INNER JOIN page p2 ON t.tl_from = p2.page_id LEFT JOIN page_restrictions pr ON pr.pr_page = p.page_id WHERE p.page_title IS NOT NULL AND lt.lt_namespace IN (10,828) AND pr.pr_page IS NULL GROUP BY 1 ORDER BY nb_inclusion_directes DESC LIMIT 3000;
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...