Postgresql Find Duplicate Rows In Python