By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
9 rows affected
date | hour | price | prev_price | grp | cumulative_increases | cumulative_increases |
---|---|---|---|---|---|---|
2020-02-05 | 0 | 188.713 | null | 0 | 0 | 0.00000000000 |
2020-02-05 | 1 | 189.532 | 188.713 | 0 | 1 | 0.00433992358 |
2020-02-05 | 2 | 188.184 | 189.532 | 1 | 0 | 0.00000000000 |
2020-02-05 | 3 | 188.432 | 188.184 | 1 | 1 | 0.00131785911 |
2020-02-05 | 4 | 189.060 | 188.432 | 1 | 2 | 0.00465501849 |
2020-02-05 | 5 | 190.264 | 189.060 | 1 | 3 | 0.01105301194 |
2020-02-05 | 6 | 191.451 | 190.264 | 1 | 4 | 0.01736066828 |
2020-02-05 | 7 | 190.762 | 191.451 | 2 | 0 | 0.00000000000 |
2020-02-05 | 8 | 190.203 | 190.762 | 3 | 0 | 0.00000000000 |