SQL
x
SET @basecat='Non-lemma_forms_by_language';
SET max_recursive_iterations=6;
WITH RECURSIVE deepcat (subcat) AS
(
SELECT @basecat
UNION
SELECT page_title
FROM categorylinks
JOIN page ON page_id = cl_from AND page_namespace = 14
JOIN deepcat ON cl_to = subcat
)
SELECT page_title, cl_to
FROM page
JOIN categorylinks ON cl_from = page_id
JOIN deepcat ON cl_to = subcat
LEFT JOIN pagelinks ON pl_namespace = page_namespace AND pl_title = page_title AND pl_from_namespace = 0
WHERE page_namespace = 0
AND pl_from IS NULL;
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.