how to sort a birthday list ?

From: Michael Agbaglo <byteshifter(at)shifted-bytes(dot)de>
To: pgsql-sql(at)postgresql(dot)org
Subject: how to sort a birthday list ?
Date: 2002-06-20 18:55:04
Message-ID: 3D122508.70104@shifted-bytes.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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 ?

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message David Stanaway 2002-06-20 21:32:50 Re: how to sort a birthday list ?
Previous Message Alla 2002-06-20 17:15:53 rowtype and ecpg