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
SELECT pl_title, COUNT(DISTINCT page_title), MIN(CONCAT( CASE page_namespace WHEN 0 THEN " " WHEN 10 THEN "Template:" WHEN 14 THEN "Category:" END , page_title)) AS page1, MAX(CONCAT( CASE page_namespace WHEN 0 THEN " " WHEN 10 THEN "Template:" WHEN 14 THEN "Category:" END , page_title)) AS page2 FROM pagelinks JOIN page ON page_id=pl_from AND page_namespace IN (0,10) JOIN templatelinks ON tl_from=pl_from AND tl_title LIKE "Portal%" WHERE pl_namespace=100 AND NOT EXISTS (SELECT 1 FROM page WHERE page_title=pl_title AND page_namespace=100 AND page_title NOT LIKE "%/%") GROUP BY pl_title ORDER BY pl_title
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...