Re: Special grouping on sorted data. - Mailing list pgsql-sql

From Tom Lane
Subject Re: Special grouping on sorted data.
Date
Msg-id 16878.1222141217@sss.pgh.pa.us
Whole thread Raw
In response to Special grouping on sorted data.  (Nicolas Beuzeboc <nicolasb@norchemlab.com>)
List 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 by date:

Previous
From: Nicolas Beuzeboc
Date:
Subject: Special grouping on sorted data.
Next
From: Craig Ringer
Date:
Subject: Re: Multi-line text fields