Re: How to GROUP results BY month - Mailing list pgsql-sql

From A. Kretschmer
Subject Re: How to GROUP results BY month
Date
Msg-id 20080716053910.GC2323@a-kretschmer.de
Whole thread Raw
In response to Re: How to GROUP results BY month  (Mark Roberts <mailing_lists@pandapocket.com>)
Responses Re: How to GROUP results BY month
Re: How to GROUP results BY month
List pgsql-sql
am  Tue, dem 15.07.2008, um 18:15:07 -0700 mailte Mark Roberts folgendes:
> 
> On Tue, 2008-07-15 at 14:31 +0200, A. Kretschmer wrote:
> > am  Tue, dem 15.07.2008, um 13:12:39 +0100 mailte Oliveiros Cristina folgendes:
> > > Howdy, all,
> > > 
> > > I have a problem.
> > > 
> > > I have a table which one of the fields is of type date.
> > > 
> > > I need to obtain the totals of the other fields in a  by-month basis
> > > IS there any easy way to do this using the GROUP BY or any other construct?
> > 
> > ... group by extract(month from date)
> > 
> > 
> > Andreas
> 
> It's worth noting that extract(month from timestamp) returns a month_no, and thus will not be suitable for grouping
queriesthat span years.
 

Right, but that wasn't the question...


Andreas
-- 
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net


pgsql-sql by date:

Previous
From: "A. Kretschmer"
Date:
Subject: Re: How to GROUP results BY month
Next
From: Steve Midgley
Date:
Subject: Problem with ORDER BY and DISTINCT ON