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
.
Of all categories that have no subcategories and one or more pages, show those that have only redirects.
Toggle Highlighting
SQL
SELECT cat_title, cat_pages FROM category WHERE cat_pages > 0 AND cat_subcats = 0 AND EXISTS (SELECT * FROM categorylinks WHERE cl_to=cat_title) AND # make sure the category really has pages NOT EXISTS (SELECT * FROM categorylinks, page WHERE cl_to=cat_title AND page_id=cl_from AND page_namespace!=14 AND page_is_redirect=0) ORDER BY cat_pages 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...