Re: [GENERAL] Query ordering question

2012-07-02 Thread Alban Hertroys
On 3 Jul 2012, at 1:22, ajmcello wrote: > db=# SELECT name,date,percent,price,time,amount FROM name WHERE amount >= > '100' AND date='$today' ORDER BY percent DESC; > > name |date | percent| price | time | amount > +++-+-

Re: [GENERAL] Query ordering question

2012-07-02 Thread David Johnston
> -Original Message- > From: ajmcello [mailto:ajmcell...@gmail.com] > Sent: Monday, July 02, 2012 8:26 PM > To: David Johnston > Cc: pgsql-general@postgresql.org > Subject: Re: [GENERAL] Query ordering question > > Thanks for the response. I'm working

Re: [GENERAL] Query ordering question

2012-07-02 Thread ajmcello
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- >> ow...@postgresql.org] On Behalf Of ajmcello >> Sent: Monday, July 02, 2012 7:23 PM >> To: pgsql-general@postgresql.org >> Subject: [GENERAL] Query ordering question >> >> I'm interested in sorting my

Re: [GENERAL] Query ordering question

2012-07-02 Thread David Johnston
> -Original Message- > From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- > ow...@postgresql.org] On Behalf Of ajmcello > Sent: Monday, July 02, 2012 7:23 PM > To: pgsql-general@postgresql.org > Subject: [GENERAL] Query ordering question > > I'm i

[GENERAL] Query ordering question

2012-07-02 Thread ajmcello
I'm interested in sorting my query by time descending, with the highest percent by latest time shown first, and then every other record associated with column name sorted by time descending, following the first record. Does that make sense? The first query is the best I've come up with. The second