I have a table full of magazines, and need to extract the latest unique issue of each magazine.
Ive tried
SELECT DISTINCT magazine F
This looks like what you need:
SELECT id, MAX(onsale) AS onsale, magazine FROM magazines GROUP BY magazine ORDER BY onsale DESC;
Check it out at:
http://sqlfiddle.com/#!2/38e78/3
UPDATE: I've changed query a little, to return MAX(onsale)