Sample data is as follows:
date value
2015-09-09 1
2015-09-08 2
2015-09-07 3
2015-09-04 4
2015-09-03 5
I need to calculate sum value for each date and two days before, so the result should appear:
2015-09-09 6 --sum value of 2015-09-09, 2015-09-08, 2015-09-07
2015-09-08 5 --sum value of 2015-09-08, 2015-09-07
2015-09-07 3 --sum value of 2015-09-07
2015-09-04 9 --sum value of 2015-09-04, 2015-09-03
2015-09-03 5 --sum value of 2015-09-03
How could I achieve it with window functions in Oracle?