Re: NOT HAVING clause?

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: NOT HAVING clause?
Дата
Msg-id 20060124072516.B27682@megazone.bigpanda.com
обсуждение исходный текст
Ответ на NOT HAVING clause?  (Alban Hertroys <alban@magproductions.nl>)
Список pgsql-general
On Tue, 24 Jan 2006, Alban Hertroys wrote:

> This is sort of a feature request, I suppose. I solved my problem, but
> "NOT HAVING" seems to match better with the desired result or the way
> you phrase the question in your mind, if that makes any sense...

One problem is that HAVING really works on entire groups at a time
(including aggregated data for the group) not on pieces of the group.

However, I think one might be able to fake it with an array accumulating
aggregate like the one from
http://www.postgresql.org/docs/current/static/xaggr.html

and a query like:

SELECT object_id FROM image GROUP BY object_id HAVING
NOT(1 = ANY(array_accum(sort_order))).

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

Предыдущее
От: Jimmy Rowe
Дата:
Сообщение:
Следующее
От: "Gevik"
Дата:
Сообщение: Re: user defined function