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
Bdijkstra
.
Project pages, help pages, categories, templates and Scribunto modules on Dutch non-Wikipedia wikis that are not linked in Wikidata but have a page of the same (sub)name in Dutch Wikipedia. Monstrous query with REGEXPs across 7 databases, but executes in ~10 s.
Toggle Highlighting
SQL
SELECT 'b' AS prefix, page_namespace AS ns, page_title AS title, page_is_new AS new, page_len AS len FROM nlwikibooks_p.page b WHERE page_is_redirect=0 AND page_namespace IN (4, 10, 12, 14, 828) AND page_title NOT REGEXP '/(doc$|[Aa]rchief)' AND NOT EXISTS (SELECT * FROM nlwikibooks_p.page_props WHERE page_id=pp_page AND pp_propname='wikibase_item') AND (((page_namespace!=14 OR b.page_title NOT REGEXP '^Wikibooks:') AND EXISTS (SELECT * FROM nlwiki_p.page w WHERE w.page_is_redirect=0 AND b.page_namespace=w.page_namespace AND b.page_title=w.page_title) ) OR (page_namespace=14 AND b.page_title REGEXP '^Wikibooks:' AND EXISTS (SELECT * FROM nlwiki_p.page w WHERE w.page_is_redirect=0 AND w.page_namespace=14 AND w.page_title REGEXP '^Wikipedia:' AND REGEXP_SUBSTR(b.page_title,':.*$')=REGEXP_SUBSTR(w.page_title,':.*$')) )) UNION SELECT 'n' AS prefix, page_namespace AS ns, page_title AS title, page_is_new AS new, page_len AS len FROM nlwikinews_p.page b WHERE page_is_redirect=0 AND page_namespace IN (4, 10, 12, 14, 828) AND page_title NOT REGEXP '/(doc$|[Aa]rchief)' AND NOT EXISTS (SELECT * FROM nlwikinews_p.page_props WHERE page_id=pp_page AND pp_propname='wikibase_item') AND ((page_namespace!=14 AND EXISTS (SELECT * FROM nlwiki_p.page w WHERE w.page_is_redirect=0 AND b.page_namespace=w.page_namespace AND b.page_title=w.page_title) ) OR (page_namespace=14 AND b.page_title REGEXP '^Wikinieuws:' AND EXISTS (SELECT * FROM nlwiki_p.page w WHERE w.page_is_redirect=0 AND w.page_namespace=14 AND w.page_title REGEXP '^Wikipedia:' AND REGEXP_SUBSTR(b.page_title,':.*$')=REGEXP_SUBSTR(w.page_title,':.*$')) ) OR (page_namespace=14 AND b.page_title NOT REGEXP '^Wikinieuws:' AND EXISTS (SELECT * FROM nlwiki_p.page w WHERE w.page_is_redirect=0 AND w.page_namespace=0 AND b.page_title=w.page_title) )) UNION SELECT 'q' AS prefix, page_namespace AS ns, page_title AS title, page_is_new AS new, page_len AS len FROM nlwikiquote_p.page b WHERE page_is_redirect=0 AND page_namespace IN (4, 10, 12, 14, 828) AND page_title NOT REGEXP '/(doc$|[Aa]rchief)' AND NOT EXISTS (SELECT * FROM nlwikiquote_p.page_props WHERE page_id=pp_page AND pp_propname='wikibase_item') AND (((page_namespace!=14 OR b.page_title NOT REGEXP '^Wikiquote:') AND EXISTS (SELECT * FROM nlwiki_p.page w WHERE w.page_is_redirect=0 AND b.page_namespace=w.page_namespace AND b.page_title=w.page_title) ) OR (page_namespace=14 AND b.page_title REGEXP '^Wikiquote:' AND EXISTS (SELECT * FROM nlwiki_p.page w WHERE w.page_is_redirect=0 AND w.page_namespace=14 AND w.page_title REGEXP '^Wikipedia:' AND REGEXP_SUBSTR(b.page_title,':.*$')=REGEXP_SUBSTR(w.page_title,':.*$')) )) UNION SELECT 's' AS prefix, page_namespace AS ns, page_title AS title, page_is_new AS new, page_len AS len FROM nlwikisource_p.page b WHERE page_is_redirect=0 AND page_namespace IN (4, 10, 12, 14, 828) AND page_title NOT REGEXP '/(doc$|[Aa]rchief)' AND NOT EXISTS (SELECT * FROM nlwikisource_p.page_props WHERE page_id=pp_page AND pp_propname='wikibase_item') AND (((page_namespace!=14 OR b.page_title NOT REGEXP '^Wikisource:') AND EXISTS (SELECT * FROM nlwiki_p.page w WHERE w.page_is_redirect=0 AND b.page_namespace=w.page_namespace AND b.page_title=w.page_title) ) OR (page_namespace=14 AND b.page_title REGEXP '^Wikisource:' AND EXISTS (SELECT * FROM nlwiki_p.page w WHERE w.page_is_redirect=0 AND w.page_namespace=14 AND w.page_title REGEXP '^Wikipedia:' AND REGEXP_SUBSTR(b.page_title,':.*$')=REGEXP_SUBSTR(w.page_title,':.*$')) )) UNION SELECT 'voy' AS prefix, page_namespace AS ns, page_title AS title, page_is_new AS new, page_len AS len FROM nlwikivoyage_p.page b WHERE page_is_redirect=0 AND page_namespace IN (4, 10, 12, 14, 828) AND page_title NOT REGEXP '/(doc$|[Aa]rchief)' AND NOT EXISTS (SELECT * FROM nlwikivoyage_p.page_props WHERE page_id=pp_page AND pp_propname='wikibase_item') AND (((page_namespace!=14 OR b.page_title NOT REGEXP '^Wikivoyage:') AND EXISTS (SELECT * FROM nlwiki_p.page w WHERE w.page_is_redirect=0 AND b.page_namespace=w.page_namespace AND b.page_title=w.page_title) ) OR (page_namespace=14 AND b.page_title REGEXP '^Wikivoyage:' AND EXISTS (SELECT * FROM nlwiki_p.page w WHERE w.page_is_redirect=0 AND w.page_namespace=14 AND w.page_title REGEXP '^Wikipedia:' AND REGEXP_SUBSTR(b.page_title,':.*$')=REGEXP_SUBSTR(w.page_title,':.*$')) )) UNION SELECT 'wikt' AS prefix, page_namespace AS ns, page_title AS title, page_is_new AS new, page_len AS len FROM nlwiktionary_p.page b WHERE page_is_redirect=0 AND page_namespace IN (4, 10, 12, 14, 828) AND page_title NOT REGEXP '/(doc$|[Aa]rchief)' AND NOT EXISTS (SELECT * FROM nlwiktionary_p.page_props WHERE page_id=pp_page AND pp_propname='wikibase_item') AND (((page_namespace!=14 OR b.page_title NOT REGEXP '^WikiWoordenboek:') AND EXISTS (SELECT * FROM nlwiki_p.page w WHERE w.page_is_redirect=0 AND b.page_namespace=w.page_namespace AND b.page_title=w.page_title) ) OR (page_namespace=14 AND b.page_title REGEXP '^WikiWoordenboek:' AND EXISTS (SELECT * FROM nlwiki_p.page w WHERE w.page_is_redirect=0 AND w.page_namespace=14 AND w.page_title REGEXP '^Wikipedia:' AND REGEXP_SUBSTR(b.page_title,':.*$')=REGEXP_SUBSTR(w.page_title,':.*$')) )) ORDER BY ns, title, prefix
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...