Remove duplicates (PostgreSQL/SQL section)