I have a doubt regarding a calculation by using analytical functions.
((1+r1)+(1+r2)+(1+r3)+....(1+r n) )*1000
where r1,r2,r3 are the values of a column in my table.
I need to get the values like this
first row (1+r1)*1000
secondrow ((1+r1)+(1+r2))*1000
.
.
.
.
nth row ((1+r1)+(1+r2)+(1+r3)+....(1+r n) )*1000
suppose you take the table as below
FUNDCODE FUNDRETURNS TIMEKEY
F1 10 200
F1 20 300
F1 40 400
F1 20 500
F1 3 600
F1 60 700
F1 70 800
F1 85 900
F1 90 1000
F1 23 1001
after applying the query
Expand|Select|Wrap|Line Numbers
- select a.*,sum((fundreturns+1)*1000) over (partition by fundcode order by timekey) runningtotal from fund_returns a
FUNDCODE FUNDRETURNS TIMEKEY RUNNINGTOTAL
F1 10 200 11000
F1 20 300 32000
F1 40 400 73000
F1 20 500 94000
F1 3 600 98000
F1 60 700 159000
F1 70 800 230000
F1 85 900 316000
F1 90 1000 407000
F1 23 1001 431000
Now I need to do a similar type but the calculation(multiplication instead of summation) is
(1+r1)*(1+r2)*(1+r3)*....(1+r n) *1000
Is it doable using analytical funtions ??? if so please throw some light on it.
Thanks in advance
Srinivasan M