Group by all fields, not just one, to make pgsql happy.