SQL
AخA
USE commonswiki_p;
SELECT DISTINCT p.page_id FROM page p
INNER JOIN templatelinks t ON t.tl_from = p.page_id AND t.tl_namespace = 10 AND t.tl_title = 'Deletion_template_tag'
INNER JOIN categorylinks c ON c.cl_from = p.page_id
LEFT JOIN page p2 ON c.cl_to = p2.page_title AND p2.page_namespace = 14
WHERE p2.page_id IS NULL
#AND c.cl_to LIKE 'Media_without_a_source_as_of%'
#AND c.cl_to LIKE 'Media_without_a_license_as_of%'
AND c.cl_to LIKE 'Media_missing_permission_as_of%'
#AND c.cl_to LIKE 'Deletion_requests%'
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.