Fork of Commons categories with only redcategories (nonempty) by Prototyperspective
This query is marked as a draft This query has been published by Prototyperspective.

SQL

AخA
 
SELECT DISTINCT page_title FROM page AS P1
LEFT JOIN categorylinks ON cl_to = page_title
WHERE 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
)
AND EXISTS (SELECT 1 FROM categorylinks WHERE cl_from = page_id)
AND cl_to IS NULL
ORDER BY 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.
All SQL code is licensed under CC0 License.

Checking query status...