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
-- Find all template modules SELECT page_id, page_title FROM page WHERE page_namespace = 828 -- Namespace number for Module AND page_title NOT LIKE 'Module:Sandbox%' -- Optional: Exclude certain modules if needed -- Find all transcluded pages UNION ALL SELECT page_id, page_title FROM page JOIN templatelinks ON page_id = tl_from WHERE tl_namespace = 828 -- Template namespace number AND tl_target_namespace = 828 -- Modules used in templates GROUP BY tl_target -- Combine results to identify unused modules -- This part will need to be adjusted based on actual Quarry schema SELECT module.page_title AS unused_module FROM (SELECT page_title FROM page WHERE page_namespace = 828) AS module LEFT JOIN (SELECT DISTINCT tl_target AS module_title FROM templatelinks WHERE tl_target_namespace = 828) AS used_modules ON module.page_title = used_modules.module_title WHERE used_modules.module_title IS NULL
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...