Re: Grouping by date range - Mailing list pgsql-general

From Tom Lane
Subject Re: Grouping by date range
Date
Msg-id 11099.1061401668@sss.pgh.pa.us
Whole thread Raw
In response to Re: Grouping by date range  (Ron Johnson <ron.l.johnson@cox.net>)
Responses Re: Grouping by date range
List pgsql-general
Ron Johnson <ron.l.johnson@cox.net> writes:
> On Tue, 2003-08-19 at 02:56, Alexander Litvinov wrote:
>> select date_part('year', date), count(*) from your_table group by
>> date_part('year', date) order by date_part('year', date);

> Is the ORDER BY really needed here?

If you want the results ordered that way, yes.

            regards, tom lane

pgsql-general by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: Buglist
Next
From: Vivek Khera
Date:
Subject: Re: Buglist