I want to get previous record value to calculate with current value;
example: current value of col3 will be = (previous col3 value + current col2 value)
Note: It is not important to maintain col1 order. Because the resulted records are fetched by Select query.
col1 | col2 | col3
------------------
a | 1 | 1
b | 2 | 3 <= 1+2
a | 1 | 4 <= 3+1
d | 3 | 7 <= 4+3
I think it is not so hard but I can not solve the problem using mysql