Re: [GENERAL] Aggregates and joined tables...

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [GENERAL] Aggregates and joined tables...
Дата
Msg-id 7954.981345993@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Aggregates and joined tables...  ("omid omoomi" <oomoomi@hotmail.com>)
Список pgsql-sql
"omid omoomi" <oomoomi@hotmail.com> writes:
> The platform is PostgreSQL 6.5.2 on i386-unknown-freebsd3.2, compiled by gcc
> 2.7.2.1 .

> I want to write a query which looks like this :
> select fa1 - sum(fc3)
> from A,B,C
> where fa1=fb1 and fb2=fc2
> group by fa1 ;
> unfortunately I get this in result:
> ERROR:  Illegal use of aggregates or non-group column in target list

Works fine in current sources.  Try upgrading to something newer than
6.5.2 ...

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: JOIN chaining not working in 7.1 beta 3
Следующее
От: "guard"
Дата:
Сообщение: pltcl how to get array value