Task:

List monthly sales for the year 2013. For each month include prior month's sales.
If there is no prior month, return 0. Also include the delta (difference) between the current and the prior month's sales.
Click here for details on LAG.
 
 12 Records
Month Sales Previous Month Delta
1 78757.60 0.00 78757.60
2 41207.20 78757.60 -37550.40
3 49476.70 41207.20 8269.50
4 55699.39 49476.70 6222.69
5 62642.70 55699.39 6943.31
6 39088.00 62642.70 -23554.70
7 64663.83 39088.00 25575.83
8 49981.69 64663.83 -14682.14
9 68093.57 49981.69 18111.88
10 70328.50 68093.57 2234.93
11 53999.51 70328.50 -16328.99
12 77476.26 53999.51 23476.75
Stay Inspired!
Join other developers and designers who have already signed up for our mailing list.
Terms     Privacy     Licensing       EULA       Sitemap      
© Data & Object Factory, LLC.
Made with    in Austin, Texas.      Vsn 1.3.0