Thanks for the question, Austin.
Asked: October 18, 2016 - 3:03 pm UTC
Last updated: October 19, 2016 - 12:53 am UTC
Version: Oracle 11g
Viewed 1000+ times
with rws as ( select rownum x from dual connect by level <= 5 ), orig as ( select 99.99 v from dual ) select 'The original price is $' || v from orig union all select 'The sale price on day #' || x || ' is $' || round(99.99 * exp(sum(ln(0.95)) over (order by x)), 2) from rws; 'THEORIGINALPRICEIS$'||V The original price is $99.99 The sale price on day #1 is $94.99 The sale price on day #2 is $90.24 The sale price on day #3 is $85.73 The sale price on day #4 is $81.44 The sale price on day #5 is $77.37
Austin Swoape, October 18, 2016 - 4:17 pm UTC
begin for i in 1 .. 5 loop x := x * 0.95; end loop; end;
Analytic SQL got you confused? Check out Connor McDonald's complete video course.