SQL
x
SET max_recursive_iterations = 3;
WITH RECURSIVE deepcat (subcat) AS
(
SELECT 'Stub-Class_articles'
UNION DISTINCT
SELECT page_title
FROM categorylinks
JOIN page ON page_id = cl_from AND page_namespace = 14
JOIN deepcat ON cl_to = subcat
)
SELECT page_namespace, COUNT(DISTINCT page_title)
FROM page
JOIN categorylinks ON cl_from = page_id
JOIN deepcat ON cl_to = subcat
GROUP BY page_namespace;
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.