Query with LIMIT clause

Поиск
Список
Период
Сортировка
От JORGE MALDONADO
Тема Query with LIMIT clause
Дата
Msg-id CAAY=A7-v4-iSVgrapiFjq4wujyVqyW-7s0vsJHu7dLb93g__eA@mail.gmail.com
обсуждение исходный текст
Ответы Re: Query with LIMIT clause
Список pgsql-sql
I have the following records that I get from a query, the fields are date type in day/month/year format:

-------------------------------------
Initial           Final
Date            Date
-------------------------------------
27/08/2012   04/09/2012
29/08/2012   09/09/2012
28/08/2012   09/09/2012
30/08/2012   09/09/2012
30/08/2012   09/09/2012
27/08/2012   09/09/2012
31/08/2012   09/09/2012
28/08/2012   10/09/2012
05/09/2012   16/09/2012

As you can see, this result is ordered by Final Date. What I need is to get the last 5 records only. If I use the LIMIT 5 clause I get the first 5. I have tried an ORDEY BY DESC but the result is the same. I will very much appreciate your comments.

Respectfully,
Jorge Maldonado

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

Предыдущее
От: "David Johnston"
Дата:
Сообщение: Re: returning values to variables from dynamic SQL
Следующее
От: "David Johnston"
Дата:
Сообщение: Re: Query with LIMIT clause