'group by day' possible?

Started by Konstantinos Agourosover 24 years ago2 messagesgeneral
Jump to latest
#1Konstantinos Agouros
elwood@agouros.de

Hi,

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?

Konstantin
--
Dipl-Inf. Konstantin Agouros aka Elwood Blues. Internet: elwood@agouros.de
Otkerstr. 28, 81547 Muenchen, Germany. Tel +49 89 69370185
----------------------------------------------------------------------------
"Captain, this ship will not sustain the forming of the cosmos." B'Elana Torres

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Konstantinos Agouros (#1)
Re: 'group by day' possible?

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