Subject Re: [Firebird-Architect] Feature request: Aggregate function for multiply
Author Alexandre Benson Smith
Leyne, Sean wrote:
> Alexandre,
>
>
> Personally, I am less than enthusiastic about this feature -- it seems
> like a custom request (I am having difficulty picturing a problem which
> would need this).
>
> Are you aware of any other database which provides this function?
>
>
> Sean
>

Sean,

I must agree with you that this is a kind of special need, but on the
other hand when I needed this I think for a minute why nobody never
needed it...

The problem that need this (if you need more detailed explanation you
could look a thread on fb-support on 08/14/2007 "View limitations") is
to get the accumulated multiplication factor in a given period.

Ivan Prenosil give a very good mathematical solution for me, that is:

SELECT Exp( SUM( Ln(x) ) ) FROM ...

This solves completely my problem on this case.

I don't know any other database engine that provides that.

I am sure that there are other solutions to the problem (like having
proxy columns to hold accumulated factors) but I would prefer very much
a "direct" solution, the one Ivan suggested fits my needs.

see you !

--
Alexandre Benson Smith
Development
THOR Software e Comercial Ltda
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br