I have a query that looks like this:
SELECT SUM(CAPITAL_RETURN) OVER (PARTITION BY PORTF_CODE,
EXTRACT(MONTH FROM END_DATE) ORDER BY END_DATE
) AS CUM_CAPITAL_RET,
FROM
....
This is fine for creating a cumulative sum column, but I now need to create a cumulative multiplication column.
Is this possible?
Thanks
The classical way of doing this is by taking the exponent of the sum of the logarithms of the values, taking care to handle negatives zeroes correctly.