Postgresql Remove Duplicate Rows In R