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
.
Pages without an explicit category sort key in categories where more than 90% of them contain a comma.
Toggle Highlighting
SQL
USE nlwiki_p; SELECT page_namespace AS ns, page_title, page_is_redirect AS rd, REPLACE(REGEXP_REPLACE(page_title, '_\\(.*\\)$', ''),'_',' ') AS name, cf.cl_to AS cat, cf.commas FROM page, ( # fraction of pages in a category having a comma in the sortkey SELECT cl_to, (COUNT(*) / (cat_pages-cat_subcats)) AS commas FROM categorylinks, category WHERE cat_title NOT REGEXP '^(Adel_|Wikipedia:)|(bisschop|club)$' AND cl_to=cat_title AND cl_sortkey_prefix REGEXP ',' GROUP BY cl_to HAVING commas > 0.9 AND commas < 1) cf, categorylinks cl WHERE page_id=cl.cl_from AND page_title NOT REGEXP '^Paus_|_Brothers$' AND page_title REGEXP '^\\p{L}+(_\\p{L}+)+(_\\(.+\\))?$' AND page_title NOT REGEXP '^\\p{L}+_[IVX]+_(der|van)_\\p{L}+$' AND page_title NOT REGEXP '^\\p{L}+(_\\p{L}+)*_(en|and)_\\p{L}+(_\\p{L}+)*$' AND cl.cl_to=cf.cl_to AND cl.cl_sortkey_prefix='' ORDER BY page_latest DESC
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...