Re: Aggregates not allowed in WHERE clause?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Frans <fransgunawan(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Aggregates not allowed in WHERE clause?
Date: 2004-12-16 05:17:49
Message-ID: 19812.1103174269@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Frans <fransgunawan(at)gmail(dot)com> writes:
> I try to use : select name, sum(quantity) from info where
> sum(quantity)>20 group by name;
> This yields the message: 'Aggregates not allowed in WHERE clause'.

> Can somebody help me here....

See
http://www.postgresql.org/docs/7.4/static/tutorial-agg.html
particularly the next-to-last paragraph.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michael Fuhr 2004-12-16 05:22:07 Re: bytea internal encoding
Previous Message Ron Peterson 2004-12-16 05:17:47 Re: bytea internal encoding