PostgreSQL musi pojawić się w grupie według klauzuli lub być używany w funkcji agregatów

Try using "DISTINCT" instead of "GROUP BY"
GutoTrosla