Re: how to sort a birthday list ? - Mailing list pgsql-sql

From David Stanaway
Subject Re: how to sort a birthday list ?
Date
Msg-id 1024608770.9198.75.camel@ciderbox
Whole thread Raw
In response to how to sort a birthday list ?  (Michael Agbaglo <byteshifter@shifted-bytes.de>)
List pgsql-sql
On Thu, 2002-06-20 at 13:55, Michael Agbaglo wrote:
> Hi !
>
> there's a nice query for retrieving the people who have their birthday
> in the next n days: (taken from Joe Celko's SQL for Smarties, 1st Ed.,
> p. 76)
>
> SELECT *
> FROM Persons
> WHERE EXTRACT( YEAR FROM AGE(dateofbirth) ) < EXTRACT( YEAR FROM AGE(
> CURRENT_DATE+60, dateofbirth ) )
>
> ... but how do I sort the list ?


How about:
ORDER BY dateofbirth



pgsql-sql by date:

Previous
From: Michael Agbaglo
Date:
Subject: how to sort a birthday list ?
Next
From: Josh Berkus
Date:
Subject: Re: SQL performance issue with PostgreSQL compared to