User:B/Fair use images used outside of mainspace

Generated from http://quarry.wmflabs.org/query/2900

USE enwiki_p;
SELECT DISTINCT CONCAT('{{subst:User:B/Fair use images used outside of mainspace/Table row|[[:{{ns:', i.il_from_namespace, '}}:',  p.page_title, ']]|[[:File:', i_p.page_title, ']]|', r.rev_timestamp, '}}') 
FROM page p
INNER JOIN imagelinks i ON i.il_from = p.page_id 
						AND i.il_from_namespace <> 0
INNER JOIN page i_p ON i.il_to = i_p.page_title AND 1 <> p.page_is_redirect
INNER JOIN categorylinks c2 ON i_p.page_id = c2.cl_from AND c2.cl_to = "All_non-free_media"
INNER JOIN revision r ON p.page_latest = r.rev_id
LIMIT 5000