postgres select duplicate columns
snippet in sql

postgres select duplicate columns

user1588

select Column1, Column2, count(*)
from yourTable
group by Column1, Column2
HAVING count(*) > 1

postgres select duplicate columns

user2882

select * from yourTable ou
where (select count(*) from yourTable inr
where inr.sid = ou.sid) > 1