I’m trying to select duplicates from this table:
snr zip
01 83
02 82
03 43
04 28
Expected result is just empty table. Cuz it got no duplicates.
I’ve tried with this query:
SELECT snr, zip
FROM student
GRUOP BY snr
HAVING (COUNT(zip) > 1)
But it says that syntax is error, and that I’m trying to query an aggregate functions, etc..
It looks like you need to either remove
zipfrom theSELECTcolumns, or else wrap it in an aggregate function, such asCOUNT(zip):Also check out @OMG Ponies’s answer for further suggestions.