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
WITH names AS ( WITH RECURSIVE deepcat (subcat, depth) AS ( SELECT 'Feminine_given_names', 0 UNION SELECT page_title, depth + 1 FROM deepcat JOIN categorylinks ON cl_type = "subcat" AND cl_to = subcat JOIN page ON page_id = cl_from AND page_namespace = 14 AND page_title LIKE "%eminine%" WHERE depth < 4 ) SELECT DISTINCT SUBSTRING_INDEX(page_title, "_", 1) AS name FROM deepcat JOIN categorylinks ON cl_type = "page" AND cl_to = subcat JOIN page ON page_id = cl_from AND page_namespace = 0 AND page_title LIKE "Ba%" ) SELECT pl_title Target, SUM(Pt.page_title IS NULL) LinkCount, MIN(Pf.page_title) ExampleLink1, MAX(Pf.page_title) ExampleLink2 FROM pagelinks LEFT JOIN page Pt ON Pt.page_namespace=0 AND Pt.page_title=pl_title JOIN page Pf ON Pf.page_id=pl_from AND NOT (Pf.page_namespace=0 AND Pf.page_title REGEXP "^(.*_)?[12]\\d{3}_") JOIN names ON name=SUBSTRING_INDEX(pl_title, "_", 1) WHERE pl_from_namespace IN (0, 10) AND pl_namespace=0 AND pl_title LIKE "Ba%" AND pl_title REGEXP "^\\p{Lu}\\p{Ll}+_(\\p{Lu}(\\p{Ll}+_|\\._?))*\\p{Lu}\\p{Ll}+(_\\(.*\\))?$" GROUP BY Target HAVING MAX(pl_from_namespace) = 0 AND LinkCount>=5 ORDER BY LinkCount DESC, Target
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...