From: Michael Agbaglo <byteshifter@shifted-bytes.de>
To: pgsql-sql@postgresql.org
Subject: how to sort a birthday list ?
Date: Thu, 20 Jun 2002 20:55:04 +0200
Message-ID: <3D122508.70104@shifted-bytes.de> (raw)
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 ?
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: byteshifter@shifted-bytes.de
Subject: Re: how to sort a birthday list ?
In-Reply-To: <3D122508.70104@shifted-bytes.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox