Date: Fri, 14 Aug 2009 05:16:16 -0700 (PDT)
I have a table that contains the fields PERIOD, STOCK, NEW_UNITS, CHURN_RATE. STOCK is only available for a given start period. I want to update the expected stock of the next periods. Is there a way that in pure SQL (without PL SQL and a cursor) I can calculate
STOCK of PERIOD (N) = STOCK of PERIOD (N-1) * (1-CHURN_RATE) + NEW_UNITS ?
Thanks and best,
Hans Received on Fri Aug 14 2009 - 07:16:16 CDT