Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
Fork of
Commons categories with only redcategories (nonempty)
by
Prototyperspective
This query is marked as a draft
This query has been published
by
Enhancing999
.
Based on https://meta.wikimedia.org/wiki/Research_talk:Quarry#c-Prototyperspective-20240924234200-Query_request
Toggle Highlighting
SQL
SELECT REPLACE(page_title,'_',' ') as category_name, cat_pages as cat_size, if (cat_pages = 0, "-", if (cat_pages = cat_subcats, "S", if(cat_pages = cat_files, "F", "S+F"))) as cat_content, page_id FROM { SELECT DISTINCT page_title, page_id FROM page AS P1, categorylinks WHERE cl_to = page_title AND page_namespace = 14 AND page_is_redirect = 0 AND NOT EXISTS ( SELECT 1 FROM categorylinks JOIN page AS P2 ON P2.page_namespace = 14 AND cl_to = P2.page_title WHERE cl_from = P1.page_id ) LIMIT 1 } as tmp, category WHERE cat_title = tmp.page_title
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...