I have a PostgreSQL database table called \"user_links\" which currently allows the following duplicate fields:
year, user_id, sid, cid
The uni
From "Find duplicate rows with PostgreSQL" here's smart solution:
select * from ( SELECT id, ROW_NUMBER() OVER(PARTITION BY column1, column2 ORDER BY id asc) AS Row FROM tbl ) dups where dups.Row > 1