I have a table like this
Id Description Tot
--- ----- -----
1 aaaa 10
2 bbbb 20
3 cccc 30
4 eeee 40
I want to get the results like this
Id Name Mark
--- ----- -----
1 aaaa 10
2 bbbb 20 + row 1.value
3 cccc 30 + row 2.values sum
4 eeee 40 + row 3.values sum
I have used the SQL LAG function but it does not give me the desired result as it only uses the previous rows value and I need the sum