Query with LIMIT clause - Mailing list pgsql-sql

From JORGE MALDONADO
Subject Query with LIMIT clause
Date
Msg-id CAAY=A7-v4-iSVgrapiFjq4wujyVqyW-7s0vsJHu7dLb93g__eA@mail.gmail.com
Whole thread Raw
Responses Re: Query with LIMIT clause
List 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 by date:

Previous
From: "David Johnston"
Date:
Subject: Re: returning values to variables from dynamic SQL
Next
From: "David Johnston"
Date:
Subject: Re: Query with LIMIT clause