Re: Potentially annoying question about date ranges (part 2)

Поиск
Список
Период
Сортировка
От Guy Rouillier
Тема Re: Potentially annoying question about date ranges (part 2)
Дата
Msg-id D4D1632DC736E74AB95FE78CD609007923B123@mtxexch01.add0.masergy.com
обсуждение исходный текст
Ответ на Re: Potentially annoying question about date ranges (part 2)  (Eberhard Lisse <nospam@lisse.NA>)
Ответы Re: Potentially annoying question about date ranges (part 2)  (Eberhard Lisse <nospam@lisse.NA>)
Список pgsql-general
Eberhard Lisse wrote:
> I receive payments, but not every day (or even every week),
> and I would like see how much I receive per week and/or per month. I
> also need to compare different years.
>
> I also would like to see what the (accumulated) sum of the payments
> is at the end of a given week, month.

Timestamp each transaction, then use a GROUP BY clause to aggregate the
numbers however you wish.  If the available date field extractions are
not sufficient, write a scalar function of your own to accomplish what
you need.

--
Guy Rouillier


В списке pgsql-general по дате отправления:

Предыдущее
От: Ron Johnson
Дата:
Сообщение: Re: storing transactions
Следующее
От: "Leonel Nunez"
Дата:
Сообщение: Re: Storing images in PostgreSQL databases (again)