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
Gonnym
.
Toggle Highlighting
SQL
SELECT lt.lt_title, COUNT(t2.tl_from) AS transclusion_count 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 templatelinks t2 -- This is the new join to count transclusions ON t2.tl_target_id = lt.lt_id -- We join on the template ID WHERE p.page_title IS NULL AND lt.lt_namespace = 10 AND p2.page_content_model = "wikitext" GROUP BY lt.lt_title LIMIT 1000;
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...