Re: grouping by date increments

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Graham Vickrage" <graham(at)digitalplanit(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: grouping by date increments
Date: 2001-01-23 16:19:04
Message-ID: 6396.980266744@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

"Graham Vickrage" <graham(at)digitalplanit(dot)com> writes:
> I have written this successfully but need to get the count in time
> increments such as per day/week/month.

Perhaps use GROUP BY date_part(...). See
stgresql.org/devel-corner/docs/postgres/functions-datetime.htm
for doco on date_part().

regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Peter Eisentraut 2001-01-23 16:27:22 Re: select returns no line
Previous Message Richard Huxton 2001-01-23 16:05:56 Re: monster query, how to make it smaller