Re: Query ordering question

Поиск
Список
Период
Сортировка
От Alban Hertroys
Тема Re: Query ordering question
Дата
Msg-id 9C942DB6-AE24-4326-BB2F-5FA0DE977565@gmail.com
обсуждение исходный текст
Ответ на Query ordering question  (ajmcello <ajmcello78@gmail.com>)
Список pgsql-general
On 3 Jul 2012, at 1:22, ajmcello wrote:

> db=# SELECT name,date,percent,price,time,amount FROM name WHERE amount >= '1000000' AND date='$today' ORDER BY
percentDESC; 
>
> name |    date     | percent        |  price  |   time   |  amount
> --------+------------+----------------+---------+----------+----------
> BOB   | 2012-07-02 |          63.77 |    8.86 | 14:59:00 | 26975372
> BOB   | 2012-07-02 |          63.77 |    8.86 | 15:01:00 | 27001372
> BOB   | 2012-07-02 |          64.06 |  8.8755 | 15:04:00 | 27145552
> BOB   | 2012-07-02 |          63.77 |    8.86 | 14:57:00 | 26946338
> GIL   | 2012-07-02 |          38.72 |  0.6789 | 14:55:00 |  1012880

This output makes no sense with the sort order you specified.
Are you sure that the output matches the query? If it does, is percent a numeric field or is it a varchar where the
numbershave varying amount of leading space perhaps? 

Alban Hertroys

--
If you can't see the forest for the trees,
cut the trees and you'll find there is no forest.


В списке pgsql-general по дате отправления:

Предыдущее
От: "David Johnston"
Дата:
Сообщение: Re: Query ordering question
Следующее
От: Pawel Veselov
Дата:
Сообщение: errors with high connections rate