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
Certes
.
This query lists template uses such as {{Portal|Foo}} or {{Portal|History|Foo|Science}} where Foo is not a portal nor a redirect to one. If multiple portals are listed for one article, they usually appear in the same template call. There will be some false positives, where an article has no such template but links to a portal in another way. However, no actual portals are listed. Most should be removed but some can usefully be replaced by similar portals which do exist. For example, {{Portal|Judaïsme}} obviously attempts to link the actual [[Portal:Judaism]].
Toggle Highlighting
SQL
SET STATEMENT max_statement_time=100 FOR SELECT pl_title AS portal, MIN(page_title) AS article, COUNT(*) howmany FROM pagelinks JOIN page ON page_id=pl_from AND page_namespace = 0 WHERE pl_namespace=100 AND pl_title NOT LIKE "%/%" /* Top level portal */ AND NOT EXISTS (SELECT 1 FROM page WHERE page_title=pl_title AND page_namespace=100) /* Portal is a redlink */ AND EXISTS (SELECT 1 FROM templatelinks WHERE tl_from=pl_from AND tl_title LIKE "Portal%") /* Article uses {{Portal...}} */ GROUP BY portal ORDER BY howmany, portal
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...