Postgresql Find Duplicate Rows In R