I have a SQL 2008 database table like this
name score
-----------------------
steve 207
steve 205
steve 200
steve 139
I want to get the difference between the rows. eqn = [row - (row + 1)]
so I would ideally want it to be,
steve 2 //207 - 205
steve 5 //205 - 200
steve 61 //200 - 139
steve 139 //139 - 0
What is the best way to do this?
Thanks!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…