I have a query that return something like this:
| ID | Val |
| 0 | 10 |
| 1 | 20 |
| 2 | 30 |
But instead of that, I want something like this:
| ID | Val | Sum |
| 0 | 10 | 10 |
| 1 | 20 | 30 |
| 2 | 30 | 60 |
Is that a way to do it on the query (I'm using MySQL)?
Tks