Re: ORDER the result of a query by date

From: "Henshall, Stuart - Design & Print" <SHenshall(at)westcountry-design-print(dot)co(dot)uk>
To: 'andres javier garcia garcia' <andresjavier(dot)garcia(at)wanadoo(dot)es>, PostgreSQL List <pgsql-sql(at)postgresql(dot)org>
Subject: Re: ORDER the result of a query by date
Date: 2002-10-24 10:59:26
Message-ID: E2870D8CE1CCD311BAF50008C71EDE8E0506DC74@MAIL_EXCHANGE
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

andres javier garcia garcia wrote:
> Hello;
> I've got the result of a query that appears as:
> cod_variable | cod_station | year | month | day | rain
> ---------------------+-------------------+--------+----------+
> ------+------
> 30201 | 7237 | 1953 | 1 | 1 | 2
> 30201 | 7237 | 1953 | 2 | 1 | 5
> 30201 | 7237 | 1953 | 3 | 1 | 0
> 30201 | 7237 | 1953 | 4 | 1 | -3 .....
>
> (Of course, thanks to Stephan Szabo for the method to obtain this
> from my strange source data. I didn't think this was possible.)
>
> After have done this query I've realized that I need the data to be
> ordered by date. Do you have any suggestion?
>
> Best regards
> ----------
> Javier
>
ORDER BY year,month,day should do it.
hth,
- Stuart

Browse pgsql-sql by date

  From Date Subject
Next Message Karel Zak 2002-10-24 11:08:11 Re: Problems with to_char(created, 'WW')
Previous Message andres javier garcia garcia 2002-10-24 10:57:28 ORDER the result of a query by date