Re: Potentially annoying question about date ranges (part 2) - Mailing list pgsql-general

From Eberhard Lisse
Subject Re: Potentially annoying question about date ranges (part 2)
Date
Msg-id 4528AC2A.4050207@lisse.NA
Whole thread Raw
In response to Re: Potentially annoying question about date ranges (part 2)  ("Guy Rouillier" <guyr@masergy.com>)
Responses Re: Potentially annoying question about date ranges (part 2)  (Eberhard Lisse <nospam@lisse.NA>)
List pgsql-general
Thank you very much.

Sorry to be unclear, they are time stamped, and I wondered if someone
could give me ssome advise how I do this aggregation. In particular do
I not know how to write such a scalar function.

Anything re-usable lying around as examples somewhere?

el

on 10/4/06 9:46 PM Guy Rouillier said the following:
> 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.
>

--
If you want to email me, replace nospam with el

pgsql-general by date:

Previous
From: Jean-Gerard Pailloncy
Date:
Subject: PL/SQL: function call like $1($2)
Next
From: Matthew Peter
Date:
Subject: Automatic locale detection?