I would like to have a rolling total in a field in my table. Example:
ID - Name - Total - RollingTotal
1 - James - 10 - 10
2 - John - 20 - 30
3 - Matthew - 10 - 40
Can anybody explain how to do this in SQL ? I literally have no idea how to go about this and it's confusing me!
I have asked the wrong question. My table actually looks more like this
ID - Group - Name - Total - Rolling Total
1 - 1 - James - 10 - 10
2 - 1 - John- 10 - 20
3 - 2 - Matthew - 20 - 20
4 - 2 - Stephanie - 30 - 50
What is the stackOverflow etiquette here. The orginal question has been answered, but I didn't explain myself well enough. Sorry all.