ERROR: aggregate function calls cannot be nested

Started by Jonathan Blitzover 16 years ago2 messagesgeneral
Jump to latest
#1Jonathan Blitz
jblitz@013.net

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

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Jonathan Blitz (#1)
Re: ERROR: aggregate function calls cannot be nested

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