I need to do Rollover sum with grouping in SQL Server
I need to sum of sales within same year for the later quaters.
Data is like shown below
Year Qtr sales
2011 1 10
2011 2 5
2011 5 30
2012 4 30
2012 5 2
I would need the output like below
Year | quater | salestillnowThisYear
2011 1 10
2011 2 15 (which is 10 + 5 from previous quaters within same year)
2011 5 45 ( 10 + 5 + 30 from previous quaters of this year)
2012 4 30
2012 4 32 (30 + 2 which is 30 from previous quater of this year)