Query Run
SET @rev = (SELECT MIN(rev_id) FROM revision WHERE... 12 months ago
SET @rev = (SELECT MIN(rev_id) FROM revision WHERE... 12 months ago