Re: Selecting count of details along with details columns

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: Selecting count of details along with details columns
Дата
Msg-id 1128022197.29347.56.camel@state.g2switchworks.com
обсуждение исходный текст
Ответ на Re: Selecting count of details along with details columns  (Axel Rau <Axel.Rau@Chaos1.DE>)
Список pgsql-sql
On Thu, 2005-09-29 at 14:08, Axel Rau wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1

> Exactly, that query works as I expected. Thank you.
> Can you answer this question as well:
> > Looking for a workaround, I learned that aggregate functions are not 
> > allowed in WHERE clauses.
> > Question: Is this conform with the standard?

The problem is that where clauses "fire" before group by does, so the
aggregate doesn't exist yet when the where clause would be doing it's
selection.

Which is why the spec, and postgresql, have the "having" clause...

See this part of the docs:

http://www.postgresql.org/docs/8.0/interactive/sql-select.html


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

Предыдущее
От: Axel Rau
Дата:
Сообщение: Re: Selecting count of details along with details columns
Следующее
От: "Ricky Sutanto"
Дата:
Сообщение: unsubscribe