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
Nemo bis
.
Looks for first-level subpages of portals which were left without incoming links or transclusions, probably after being superseded by newer templates.
Toggle Highlighting
SQL
USE enwiki_p; SELECT page_title, count(tl_from) AS transclusions, COUNT(pl_from) AS links -- , COUNT(tl_from) FROM page LEFT JOIN templatelinks ON page_title = tl_title AND tl_namespace = 100 AND tl_from_namespace = 100 LEFT JOIN pagelinks ON page_title = pl_title AND pl_from_namespace = 100 AND pl_namespace = 100 WHERE page_namespace = 100 -- Deeper levels of subpages may be transcluded only in rotation: AND page_title RLIKE "^[^/]+/[^/]+$" GROUP BY page_title -- Otherwise a first-level subpage without any transclusion is suspect: HAVING transclusions = 0 -- {{Random portal component}} and {{Transclude random subpage}} embed sub-subpages but only link the subpage AND links = 0;
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...