Re: "compressing" consecutive values into one - Mailing list pgsql-sql

From bricklen
Subject Re: "compressing" consecutive values into one
Date
Msg-id AANLkTikjE2M5YsDqsKRsRs4rAPySE-U2h9pCLoNK8Jmh@mail.gmail.com
Whole thread Raw
In response to Re: "compressing" consecutive values into one  (Louis-David Mitterrand <vindex+lists-pgsql-sql@apartia.org>)
List pgsql-sql
On Tue, Nov 23, 2010 at 10:13 AM, Louis-David Mitterrand
<vindex+lists-pgsql-sql@apartia.org> wrote:
> On Tue, Nov 23, 2010 at 03:31:59PM -0000, Oliveiros d'Azevedo Cristina wrote:
>> Salut, Louis-David,
>>
>> Can you please state the columns belonging to price table
>> and give a concrete example?
>> Say, data before and data after you want to do?
>
> Hi Cristina,
>
> Data before:
>
>        id_price | price
>        ----------------
>        1        | 23
>        3        | 45
>        4        | 45
>        6        | 45
>        8        | 45
>        9        | 89
>
> Data after:
>
>        id_price | price
>        ----------------
>        1        | 23
>        8        | 45
>        9        | 89
>

select max(id_price),price
from price_table
group by price
order by 1;

pgsql-sql by date:

Previous
From: Louis-David Mitterrand
Date:
Subject: Re: "compressing" consecutive values into one
Next
From: "Mikhail V. Puzanov"
Date:
Subject: atomic multi-threaded upsert