Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> exponential average

exponential average

From: Laly <laly.kattoor_at_freesbee.fr>
Date: 11 Dec 2002 11:38:24 -0800
Message-ID: <4ec940f.0212111138.1658f90d@posting.google.com>


Hi,

Does anyone know how i can compute an exponential average using analytical functions under Oracle. It is easy to get normal moving average with avg(...) over(partition by ... order by ... rows 60 preceding) but how about getting :
x(n) + a*x(n-1) + a^2*x(n-2)+....



1 + a + a^2 + ...

More generally, is it possible to compute a column using the value just computed in the row before ? Something like x(n+1) = f(x(n)) where n is the number of the row ?

Thanks by advance for any clue.

Laly. Received on Wed Dec 11 2002 - 13:38:24 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US