Skip site navigation (1) Skip section navigation (2)

Re: How to re-sort a sorted query?

From: "Yudie" <yudie(at)axiontech(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: How to re-sort a sorted query?
Date: 2004-10-27 15:30:15
Message-ID: 003001c4bc39$dd0470b0$ (view raw, whole thread or download thread mbox)
Lists: pgsql-sql
> 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.


> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?

In response to

pgsql-sql by date

Next:From: Bruno Wolff IIIDate: 2004-10-27 15:36:43
Subject: Re: How do you compare (NULL) and (non-NULL)?
Previous:From: Jon UhalDate: 2004-10-27 15:09:39
Subject: Foreign Key Non-Null Problem in 8.0

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group