I have the following table in my SQL Server 2012 instance:
+---------+---------+
| Quarter | Values |
+---------+---------+
| Q1 | 10 |
| Q2 | 15 |
| Q3 | 5 |
| Q4 | 1 |
+---------+---------+
I would like grouping quarter in order to sum values to obtain
Q1 = 25
Q2 = 31
So, Q2 sum also previous values that exist in Q1.
If I had Q3 the sum would be Sum(Q1) + Sum (Q2) + Sum (Q3).
In this way a simple Group by clause doesn't work.
Can anybody help me to find a solution in order to perform the described task using a simple select statement without using Union, please?