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
Surjection
.
Toggle Highlighting
SQL
SELECT page_id, page_namespace, page_title FROM (SELECT page_id, page_namespace, page_title, COUNT(*) AS total_transclusions, COUNT(CASE WHEN tl_from_namespace = 0 OR tl_from_namespace = 118 THEN 1 END) AS content_transclusions FROM page INNER JOIN linktarget ON page.page_namespace = linktarget.lt_namespace AND page.page_title = linktarget.lt_title INNER JOIN templatelinks ON linktarget.lt_id = templatelinks.tl_target_id GROUP BY page_id HAVING COUNT(*) + COUNT(CASE WHEN tl_from_namespace = 0 OR tl_from_namespace = 118 THEN 1 END) >= 1000) AS very_transcluded LEFT OUTER JOIN page_restrictions AS edit_prot ON very_transcluded.page_id = edit_prot.pr_id AND edit_prot.pr_type = 'edit' LEFT OUTER JOIN page_restrictions AS move_prot ON very_transcluded.page_id = move_prot.pr_id AND move_prot.pr_type = 'move' WHERE (edit_prot.pr_level IS NULL OR edit_prot.pr_expiry IS NOT NULL) OR (move_prot.pr_level IS NULL OR move_prot.pr_expiry IS NOT NULL) GROUP BY page_id;
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...