1

I have a tables in a MySQL database like this:

Intially it will be like this. i want to update the table using query.

inital Weekly =5, and update it in accural, next i want to update the 5+6=11 in accural next 11+7 =18 in accural column

how to do that?

Leave:

userid     | Weekly |Accural |
-----------+--------+---------+
1          | 5      |        |
2          | 5      |        |
3          | 5      |        |

OUTPUT:

userid     | Weekly |Accural  |
-----------+--------+---------+
1          | 5      |  5      |
2          | 6      |  11     |
3          | 7      |  18     |
ASD
  • 4,747
  • 10
  • 36
  • 56
  • 1
    Possible duplicate of [Create a Cumulative Sum Column in MySQL](https://stackoverflow.com/questions/2563918/create-a-cumulative-sum-column-in-mysql) – pritaeas Aug 29 '18 at 07:59

0 Answers0