From: | bricklen <bricklen(at)gmail(dot)com> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: "compressing" consecutive values into one |
Date: | 2010-11-23 18:19:45 |
Message-ID: | AANLkTikjE2M5YsDqsKRsRs4rAPySE-U2h9pCLoNK8Jmh@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On Tue, Nov 23, 2010 at 10:13 AM, Louis-David Mitterrand
<vindex+lists-pgsql-sql(at)apartia(dot)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;
From | Date | Subject | |
---|---|---|---|
Next Message | Mikhail V. Puzanov | 2010-11-24 20:16:59 | atomic multi-threaded upsert |
Previous Message | Louis-David Mitterrand | 2010-11-23 18:13:29 | Re: "compressing" consecutive values into one |