Re: Special grouping on sorted data.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Special grouping on sorted data.
Дата
Msg-id 16878.1222141217@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Special grouping on sorted data.  (Nicolas Beuzeboc <nicolasb@norchemlab.com>)
Список pgsql-sql
Nicolas Beuzeboc <nicolasb@norchemlab.com> writes:
> I was looking for a simple solution to this problem. I can't find a way 
> to group on b and n by just collapsing sequential n's (identical n's 
> right next to each other) the sorting condition is the timestamp.

I'm not totally certain that I understand what you need, but it sounds
like the SELECT DISTINCT ON feature might solve it for you.  Look into
our SELECT reference page at the "weather reports" example.
        regards, tom lane


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

Предыдущее
От: Nicolas Beuzeboc
Дата:
Сообщение: Special grouping on sorted data.
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: Multi-line text fields