SQL
x
SET @parentcat = 'Speedy deletion';
SELECT log_namespace, log_title, GROUP_CONCAT(DISTINCT zc.cl_to SEPARATOR ' | ') AS cat
FROM logging_logindex
JOIN categorylinks AS zc ON zc.cl_from = log_page
JOIN archive ON ar_namespace = log_namespace AND ar_title = log_title AND ar_page_id = log_page -- this filters out redirects left by moves
JOIN page ON page_namespace = 14 AND page_title = zc.cl_to
JOIN categorylinks AS sc ON sc.cl_from = page_id
WHERE sc.cl_to = REPLACE(@parentcat, ' ', '_')
AND NOT EXISTS (SELECT 1 FROM page WHERE page_id = log_page)
GROUP BY log_namespace, log_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.