My table is called items
. It has the columns item_id
and source
as well as some other columns.
I want to do a select ordered by item_id
but I also want to not have any duplicates in the source
column of the result.
What's wrong with this query?
SELECT *
FROM items
WHERE item_section='sp_500'
ORDER BY item_id DESC
GROUP BY source
LIMIT 3