By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
5 rows affected
| new_initial_inventory | thedate | received_sold | new_final_inventory |
|---|---|---|---|
| 20 | 2023-01-01 | -1 | 19 |
| 19 | 2023-01-02 | 0 | 19 |
| 19 | 2023-01-03 | 4 | 23 |
| 23 | 2023-01-04 | 2 | 25 |
| 25 | 2023-01-05 | -2 | 23 |
| new_initial_inventory | thedate | received_sold | new_final_inventory |
|---|---|---|---|
| 20 | 2023-01-01 | -1 | 19 |
| 19 | 2023-01-02 | 0 | 19 |
| 19 | 2023-01-03 | 4 | 23 |
| 23 | 2023-01-04 | 2 | 25 |
| 25 | 2023-01-05 | -2 | 23 |
5 rows affected
| initial_inventory | thedate | received_sold | final_inventory |
|---|---|---|---|
| 20 | 2023-01-01 | -1 | 19 |
| 19 | 2023-01-02 | 0 | 19 |
| 19 | 2023-01-03 | 4 | 23 |
| 23 | 2023-01-04 | 2 | 25 |
| 25 | 2023-01-05 | -2 | 23 |