By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
7 rows affected
id | date | records | moving_sum | batch_number |
---|---|---|---|---|
1 | 2019-03-28 | 5 | 5 | 1 |
2 | 2019-03-29 | 5 | 10 | 1 |
3 | 2019-03-30 | 5 | 15 | 1 |
4 | 2019-03-28 | 2 | 2 | 2 |
5 | 2019-03-12 | 1 | 3 | 2 |
6 | 2019-03-28 | 12 | 15 | 2 |
7 | 2019-03-12 | 1 | 1 | 3 |