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
.
Toggle Highlighting
SQL
SELECT Pa.page_title AS article, Pt.page_title AS template, MIN(Ct.cl_to) AS cat1, MAX(Ct.cl_to) AS cat2 FROM categorylinks Ca JOIN page Pa ON Pa.page_id = Ca.cl_from AND Pa.page_namespace = 0 JOIN page Pt ON Pt.page_namespace = 10 AND Pt.page_title = REPLACE(REPLACE(Pa.page_title, "_(name)", ""), "_(given_name)", "") /* = CONCAT(Pa.page_title,"_(given_name)") */ JOIN templatelinks ON tl_from = Pt.page_id AND tl_namespace = 10 AND tl_title = "Navbox" LEFT JOIN categorylinks Ct ON Ct.cl_from = Pt.page_id WHERE Ca.cl_to = "Given_names" AND NOT EXISTS (SELECT * FROM templatelinks WHERE tl_from = Pt.page_id AND tl_namespace = 10 AND tl_title = "Navbox_musical_artist") GROUP BY article, template ORDER BY article, 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...