I'm having trouble on adding a overall incrementing row to a relatively big SELECT request. The table looks like:
+-----------+------------+
| Date | Amount |
+-----------+------------+
| 10:11:15 | 25 |
| 10:11:25 | 150 |
| 10:11:35 | 120 |
| 10:11:45 | 90 |
| 10:11:55 | 100 |
+-----------+------------+
And I want to add a new column with the overall amount to that time, like:
+-----------+------------+------------+
| Date | Amount | Overall |
+-----------+------------+------------+
| 10:11:15 | 25 | 25 |
| 10:11:25 | 150 | 175 |
| 10:11:35 | 120 | 295 |
| 10:11:45 | 90 | 385 |
| 10:11:55 | 100 | 485 |
+-----------+------------+------------+
the table is sorted for time, so the last row would show the overall amount till that timestamp. Couldn't find any solution yet, and would be happy if you can help out, so i don't have to hardcode that.