By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
| id | country | sales_date | sales_volume | fix_costs |
|---|---|---|---|---|
| 1 | DE | 2020-12-01 | 500 | 0 |
| 2 | NL | 2020-12-01 | 320 | 0 |
| 3 | FR | 2020-12-01 | 350 | 0 |
| 4 | DE | 2020-12-02 | 700 | 0 |
| 5 | NL | 2020-12-02 | 420 | 0 |
| 6 | FR | 2020-12-02 | 180 | 0 |
| 7 | DE | 2020-12-03 | 0 | 0 |
| 8 | NL | 2020-12-03 | 0 | 0 |
| 9 | FR | 2020-12-03 | 0 | 0 |
| id | country | sales_date | sales_volume | fix_costs | imputed_fixed_costs |
|---|---|---|---|---|---|
| 1 | DE | 2020-12-01 | 500 | 0 | 37.95066412 |
| 2 | NL | 2020-12-01 | 320 | 0 | 0.00000000 |
| 3 | FR | 2020-12-01 | 350 | 0 | 26.56546494 |
| 4 | DE | 2020-12-02 | 700 | 0 | 51.31964807 |
| 5 | NL | 2020-12-02 | 420 | 0 | 0.00000000 |
| 6 | FR | 2020-12-02 | 180 | 0 | 13.19648091 |
| 7 | DE | 2020-12-03 | 0 | 0 | null |
| 8 | NL | 2020-12-03 | 0 | 0 | 0.00000000 |
| 9 | FR | 2020-12-03 | 0 | 0 | null |
| id | country | sales_date | sales_volume | fix_costs | imputed_fixed_costs |
|---|---|---|---|---|---|
| 1 | DE | 2020-12-01 | 500 | 0 | 37.95066412 |
| 2 | NL | 2020-12-01 | 320 | 0 | 0.00000000 |
| 3 | FR | 2020-12-01 | 350 | 0 | 26.56546494 |
| 4 | DE | 2020-12-02 | 700 | 0 | 51.31964807 |
| 5 | NL | 2020-12-02 | 420 | 0 | 0.00000000 |
| 6 | FR | 2020-12-02 | 180 | 0 | 13.19648091 |
| 7 | DE | 2020-12-03 | 0 | 0 | 32.25805000 |
| 8 | NL | 2020-12-03 | 0 | 0 | 0.00000000 |
| 9 | FR | 2020-12-03 | 0 | 0 | 32.25805000 |