This is my table
id daily pre_daily created_at 1 2000 34.50 2019-01-01 14:08:45 2 2450 30.4 2019-01-02 14:08:45 3 3500 33.7 2019-01-03 14:08:45
I want to generate the following output
id daily accumulation 1 2000 2000 2 2450 4450 3 3500 7950
How can I make calculations like this ? please help I want my data to recap for one month with calculations like this