GROUP by

From: Antti Linno <alligator(at)all(dot)ee>
To: pgsql-sql(at)postgresql(dot)org
Subject: GROUP by
Date: 2000-07-05 11:14:55
Message-ID: Pine.LNX.4.04.10007051409050.13491-100000@all.ee
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I have table job, and I want to select data from it, grouping by
workgroups. When I use
select id,name from job where workgroup='top leaders' AND ... group by
workgroup;
When I want to group, I get
ERROR: Illegal use of aggregates or non-group column in target list
I'm confused, why does query work only with sum,min etc. alone in
select.

Antti

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Jerome Alet 2000-07-05 11:50:44 Re: GROUP by
Previous Message Gerhard Dieringer 2000-07-05 10:31:16 Antw: Problem with joins