Hi Team,
I need to populate column B based on column A. Expected Column B and Explaination is given below.
Column A | Column B | Expected Column B | Explaination |
0 | NULL | 0 | If column A is 0 then Column B should be 0 |
0 | NULL | 0 | |
1 | NULL | 1 | If column A is 1 then add from previous value (1+0) |
0 | NULL | 0 | |
1 | NULL | 1 | If colmn A is 1 then add from previous value (1+0) |
1 | NULL | 2 | If colmn A is 1 then add from previous value (1+1) |
1 | NULL | 3 | If colmn A is 1 then add from previous value (1+2) |
1 | NULL | 4 | If colmn A is 1 then add from previous value (1+3) |
Request you to kindly help. Thanks in advance.
Regards,
Kashif