| От | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера