Re: [SQL] Special grouping on sorted data.

2008-09-23 Thread Tom Lane
Nicolas Beuzeboc <[EMAIL PROTECTED]> writes: > I which distinct on was more flexible, it's not happy when the order by > set is different than the distinct on set. > I would like to be able to write select distinct on (b,n) b,n,stamp from > table where ... order by stamp; Well, no, because it's

Re: [SQL] Special grouping on sorted data.

2008-09-23 Thread Nicolas Beuzeboc
I which distinct on ... I wish distinct on ... -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL] Special grouping on sorted data.

2008-09-23 Thread Nicolas Beuzeboc
Craig Ringer wrote: b| n | stamp A| 1 | 2008-09-20 06:07:47.981445 [1] A| 1 | 2008-09-20 06:08:13.294306 [1] A| 1 | 2008-09-20 06:12:02.046596 [1] A| 2 | 2008-09-20 06:12:26.267786 [2] A| 2 | 2008-09-20 06:12:47.75042

Re: [SQL] Special grouping on sorted data.

2008-09-22 Thread Craig Ringer
Nicolas Beuzeboc wrote: Hi, 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. b| n | stamp ---

Re: [SQL] Special grouping on sorted data.

2008-09-22 Thread Tom Lane
Nicolas Beuzeboc <[EMAIL PROTECTED]> 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 underst

[SQL] Special grouping on sorted data.

2008-09-22 Thread Nicolas Beuzeboc
Hi, 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. b| n | stamp A| 1 | 200