Problem:

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 66692.80 0.00 66692.80
2 41207.20 66692.80 -25485.60
3 39979.90 41207.20 -1227.30
4 55699.39 39979.90 15719.49
5 56823.70 55699.39 1124.31
6 39088.00 56823.70 -17735.70
7 55464.93 39088.00 16376.93
8 49981.69 55464.93 -5483.24
9 59733.02 49981.69 9751.33
10 70328.50 59733.02 10595.48
11 45913.36 70328.50 -24415.14
12 77476.26 45913.36 31562.90
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