Re: GROUP by

Поиск
Список
Период
Сортировка
От Jesus Aneiros
Тема Re: GROUP by
Дата
Msg-id Pine.LNX.4.10.10007050745420.28780-100000@jagua.cfg.sld.cu
обсуждение исходный текст
Ответ на GROUP by  (Antti Linno <alligator@all.ee>)
Список pgsql-sql
You can use group by without having an aggregate operator but if you use
an aggregate you have to put the group by column int the select.

By the way what is after the AND? I hope it is not another workgroup
condition because it doesn't have much sense, I think. If you are
filtering different types of workgroup you should use OR.

Jesus.

On Wed, 5 Jul 2000, Antti Linno wrote:

> 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
> 
> 



В списке pgsql-sql по дате отправления:

Предыдущее
От: "Gerhard Dieringer"
Дата:
Сообщение: Antw: GROUP by
Следующее
От: "tjk@tksoft.com"
Дата:
Сообщение: Re: Group BY ...(cont.)