I have a table with daily count data, which looks something like this:
Date Count
2019-12-01 100
2019-12-02 200
2019-12-03 300
... ...
2020-01-01 10
2020-01-02 200
2020-01-03 500
I am trying to compute the running total on a daily basis for each month. The desired result should look like this:
Date Count Running Total
2019-12-01 100 100
2019-12-02 200 300
2019-12-03 300 600
... ...
2020-01-01 10 10
2020-01-02 200 210
2020-01-03 500 710
...
I managed to compute a running total for a single month, however I am struggling to get the running totals for multiple months with a single query. Anyone knows how to do or can provide an idea to do it only using SQL? I am running MySQL 5.7.
Best