> 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
>


---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match

Reply via email to