SQLTeam.com | Weblogs | Forums

Getting sum of current and next row in sql server 2008/2005

sql2008

#1

Dear Sirs

My data is as below till 3rd columns

Year Month Sumsales Curr_Next
2016 12 100 220
2017 1 120 170
2017 2 50 190
2017 3 140 310
2017 4 170 170

Output is needed as per above having first three coloums as above plus last column (having addition of current and next row). Please suggest.