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;