Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
Fork of
Taxonomy templates linking to non-taxon homonyms
by
Certes
This query is marked as a draft
This query has been published
by
Certes
.
Template:Taxonomy/Foo links to Bar (qualifier) which is a redirect to Bar. Normally, Foo=Bar.
Toggle Highlighting
SQL
SELECT Pt.page_title as Template, Pa.page_title AS Redirect, CASE Pt.page_title WHEN CONCAT("Taxonomy/", Pa.page_title) THEN "" ELSE "Different" END AS Different FROM page Pt JOIN linktarget ON lt_namespace = 0 AND lt_title = SUBSTRING(Pt.page_title,10) AND lt_title LIKE "%_(%" JOIN pagelinks ON pl_from = Pt.page_id AND pl_target_id = lt_id JOIN page Pa ON Pa.page_title = lt_title AND Pa.page_namespace = 0 AND Pa.page_is_redirect = 1 JOIN redirect ON rd_from = Pa.page_id AND rd_title = SUBSTRING_INDEX(Pa.page_title, '_(', 1) JOIN page Pr ON Pr.page_title = rd_title AND Pr.page_namespace = 0 WHERE Pt.page_namespace=10 AND Pt.page_title like 'Taxonomy/%' ORDER BY Template
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...