I have a table full of magazines, and need to extract the latest unique issue of each magazine.
Ive tried
SELECT DISTINCT magazine F
You need to put the 'rest of data' in the first select:
SELECT DISTINCT magazine, "rest of data" FROM product p INNER JOIN ( SELECT title, MAX(onSale) AS Latest FROM product GROUP BY magazine ) groupedp