Date | Column_A | Column_B
Day 1 | 5 | 7
Day 2 | -3 | 7 + (-3) = 4
Day 3 | 8 | 4 + 8 = 12
Day 4 | -21 | 12 + (-21) -> 0 (see formula on row n)
Day n-1 | ... | Column_B(n-1)
Day n |Column_A(n) | IF(Column_B(n-1) + Column_A(n) >= 0, Column_B(n-1) +
Column_A(n), 0)
如何在 Mysql 中填充 Column_B ?