SQL
x
USE commonswiki_p;
SELECT CONCAT('# [[', REPLACE(page_title,'_',' '), ']]') AS gal,
CONCAT('→ [[User:', REPLACE(rd_title,'_',' '), ']]') AS usr
FROM page
INNER JOIN redirect
ON rd_from = page_id
AND rd_namespace = 2
WHERE page_namespace = 0
AND page_title NOT LIKE 'Commons%'
AND page_title NOT IN ('Flickr_upload_bot', 'Flinfo')
ORDER BY gal;
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.