Postgresql Find Duplicate Rows In Python List