Обсуждение: ERROR: aggregate function calls cannot be nested

Поиск
Список
Период
Сортировка

ERROR: aggregate function calls cannot be nested

От
Jonathan Blitz
Дата:
Hi,
I am getting the message 'ERROR: aggregate function calls cannot be nested" when using a select from an inner select.
 
The outer select had a group by clause but the inner one is a straight join between a few tables.
 
What exactly does this message mean?
 
Jonathan Blitz

Re: ERROR: aggregate function calls cannot be nested

От
Tom Lane
Дата:
Jonathan Blitz <jblitz@013.net> writes:
> What exactly does this message mean?

It means you can't write something like avg(sum(x)).

            regards, tom lane