Fork of
ORFU files, not tagged F5, w/redir counts
by Cryptic
This query is marked as a draft
This query has been published
by Cryptic.
SQL
AخA
SELECT img.page_title
FROM categorylinks AS c1
JOIN page AS img ON img.page_id = c1.cl_from
LEFT JOIN categorylinks AS c2 ON c2.cl_from = c1.cl_from AND c2.cl_to = 'All_orphaned_non-free_use_Wikipedia_files'
LEFT JOIN imagelinks ON il_to = img.page_title AND il_from_namespace = 0
WHERE img.page_namespace = 6
AND c1.cl_to = 'All_non-free_media'
AND c2.cl_from IS NULL
AND il_from IS NULL
AND img.page_is_redirect = 0
AND NOT EXISTS
(SELECT 1
FROM redirect
JOIN page AS rdr ON rdr.page_id = rd_from
JOIN imagelinks ON il_to = rdr.page_title AND il_from_namespace = 0
WHERE rd_namespace = 6
AND rd_title = img.page_title
AND rdr.page_namespace = 6)
ORDER BY page_title ASC;
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.