(SELECT * FROM photos GROUP BY album ORDER BY photoid DESC LIMIT 0, 3)