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
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!='Vermoord_politicus' AND cat_title NOT REGEXP '^(Adel_|Persoon_in_de_|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 NOT EXISTS (SELECT * FROM pagelinks WHERE pl_from=5606063 AND pl_namespace=page_namespace AND pl_title=page_title) AND page_id=cl.cl_from AND page_title NOT REGEXP '^(Paus|Minister|Raadsheer|Rector|Stadhouder|Zuster)_' AND page_title NOT REGEXP '_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 page_title NOT REGEXP '^(Architect|Kampgevangene|Landdrost|Militair|Minister|Persoon|Voorman)_(in|binnen)_' AND page_title NOT REGEXP '^(' 'Abt|Admiraal|Admiraliteit|Ambtenaar|Apostolisch_vicaris|' 'Bestuurder|Bisschop|Bondskanselier|Bondspresident|Burgemeester|Burggraaf|' 'Campusrector|Commissaris|' 'Districtsvoorzitter|Domproost|' 'Forestier|' 'Gemeenteraadslid|Gedeputeerde|Gevolmachtigd_minister|Gouverneur|Graaf|Grietman|' 'Heer|Hoofd(redacteur)?|' 'Kanselier|Keizer|Koning|' 'Lid|Lijsten|' 'Markgraaf|Muziekalbum|' 'Nummer|' 'Opperste_directeur|' 'Partijvoorzitter|Partner|Pensionaris|Politiek_secretaris|Potestaat|Prefect|Premier|President|' 'Raadpensionaris|Ridderschap|Rector_magnificus|Rechter|' 'Schepen|Schilder|Schout|Secretaris|Speaker|Stadsbibliothecaris|' 'Vicekanselier|Vicepremier|Vicepresident|Voorzitter|' 'Winnaar)_(van|der)_' AND page_title NOT REGEXP '^(Chief_of_|Commandant_|Hoge_commissaris_voor_de_|Hoogleraar_aan_|Rechter_bij_)' AND (page_namespace!=14 OR page_title NOT REGEXP '_([a-z]+)$') 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...