Re: 'group by day' possible?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: 'group by day' possible?
Дата
Msg-id 14584.996793831@sss.pgh.pa.us
обсуждение исходный текст
Ответ на 'group by day' possible?  (elwood@agouros.de (Konstantinos Agouros))
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Timestamp with time zone issue
Следующее
От: "Susan Lane"
Дата:
Сообщение: Pgadmin