Re: 'group by day' possible? - Mailing list pgsql-general

From Tom Lane
Subject Re: 'group by day' possible?
Date
Msg-id 14584.996793831@sss.pgh.pa.us
Whole thread Raw
In response to 'group by day' possible?  (elwood@agouros.de (Konstantinos Agouros))
List pgsql-general
elwood@agouros.de (Konstantinos Agouros) writes:
> I have a table where I enter some data with a full flexed datetime. Is there
> a _simple_ aggregate that I get the sum of entries for each day?

Maybe I'm missing something, but what's wrong with

    select sum(datacol) from table group by date(timestampcol);

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Timestamp with time zone issue
Next
From: "Susan Lane"
Date:
Subject: Pgadmin