> select * from
> (select distinct on (storenumber), itemsku, storenumber,price
> from storeproduct where itemsku='10001'
> order by storenumber, price) ss
> order by price;
>
> regards, tom lane
Thanks tom, this is working. I never thought it could be done like this.
yudie
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>