By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
8 rows affected
id | test | test1 | l | counter |
---|---|---|---|---|
1 | 31477831 | a1 | 0 | 0 |
2 | 31477831 | a0 | 1 | 1 |
3 | 31477831 | a1 | 1 | 2 |
4 | 31477831 | a0 | 1 | 3 |
5 | 31477831 | a0 | 0 | 3 |
6 | 31477832 | a0 | 0 | 0 |
7 | 31477832 | a0 | 0 | 0 |
8 | 31477832 | a1 | 1 | 1 |