I have a table just like that:
date sales rest
1/1/2017 52 0
2/1/2017 30 0
3/1/2017 10 200.
I only have the rest in the last date and i want to make it like this:
1/1/2017 52 240
2/1/2017 30 210
3/1/2017 10 200.
What I want to achieve to to calculate in a new column the rest for every date from the sum of the day's sales and the last days rest.
Can someone suggest a query ?