Say I have the table below:
Id Grade 1 Grade 2 Grade 3
1 1 1 1
2 5 0 0
3 3 1 5
I want the result as exactly as follows:
Id Grade 1 Grade 2 Grade 3 Total
1 1 1 1 3
2 5 0 0 8
3 3 1 5 17
Total should be the sum from the current column + the previous total.
Is that possible in MYSQL?