By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
10 rows affected
4 rows affected
week |
---|
5 |
7 |
8 |
9 |
week | amount | prev |
---|---|---|
1 | 100.00 | null |
2 | 100.00 | 100.00 |
3 | 100.00 | 200.00 |
4 | 100.00 | 300.00 |
5 | 100000.00 | 400.00 |
6 | 100.00 | 300.00 |
7 | 50000.00 | 300.00 |
8 | 50000.00 | 200.00 |
9 | 50000.00 | 100.00 |
10 | 100.00 | 100.00 |
Warning: Null value is eliminated by an aggregate or other SET operation.
week | amount | sum4 | cnt4 | sum5 | cnt5 | sum6 | cnt6 |
---|---|---|---|---|---|---|---|
1 | 100.00 | null | 0 | null | 0 | null | 0 |
2 | 100.00 | 100.00 | 1 | 100.00 | 1 | 100.00 | 1 |
3 | 100.00 | 200.00 | 2 | 200.00 | 2 | 200.00 | 2 |
4 | 100.00 | 300.00 | 3 | 300.00 | 3 | 300.00 | 3 |
5 | 100000.00 | 400.00 | 4 | 400.00 | 4 | 400.00 | 4 |
6 | 100.00 | 300.00 | 3 | 400.00 | 4 | 400.00 | 4 |
7 | 50000.00 | 300.00 | 3 | 400.00 | 4 | 500.00 | 5 |
8 | 50000.00 | 200.00 | 2 | 300.00 | 3 | 400.00 | 4 |
9 | 50000.00 | 100.00 | 1 | 200.00 | 2 | 300.00 | 3 |
10 | 100.00 | 100.00 | 1 | 100.00 | 1 | 200.00 | 2 |
Warning: Null value is eliminated by an aggregate or other SET operation.