Re: Special grouping on sorted data.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Nicolas Beuzeboc <nicolasb(at)norchemlab(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Special grouping on sorted data.
Date: 2008-09-23 03:40:17
Message-ID: 16878.1222141217@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Nicolas Beuzeboc <nicolasb(at)norchemlab(dot)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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Craig Ringer 2008-09-23 03:54:18 Re: Multi-line text fields
Previous Message Nicolas Beuzeboc 2008-09-22 22:49:38 Special grouping on sorted data.