Re: Aggregates not allowed in WHERE clause?

Поиск
Список
Период
Сортировка
От Christopher Browne
Тема Re: Aggregates not allowed in WHERE clause?
Дата
Msg-id m34qim4v9m.fsf@knuth.knuth.cbbrowne.com
обсуждение исходный текст
Ответ на Aggregates not allowed in WHERE clause?  (Frans <fransgunawan@gmail.com>)
Список pgsql-general
A long time ago, in a galaxy far, far away, fransgunawan@gmail.com (Frans) wrote:
> This yields the message: 'Aggregates not allowed in WHERE clause'.
>
> Can somebody help me here....

What it says is right; SQL does not permit using aggregates in the
WHERE clause.

You need to look at the HAVING clause which is, more or less, the
equivalent to WHERE specifically for use with aggregates...
--
(format nil "~S@~S" "cbbrowne" "gmail.com")
http://www.ntlug.org/~cbbrowne/nonrdbms.html
"If  use of  the GPL filters  out people   who are  only interested in
inventing the  worst possible motives  for my  actions then,  yes, I'm
happy to learn that it serves a useful purpose  I'd never thought of."
-- Dave Pearson

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

Предыдущее
От: Mickael Remond
Дата:
Сообщение: Re: Insert do not work in my case
Следующее
От: "Joolz"
Дата:
Сообщение: pl/pgsql oddity