By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
| product | KPI | SUM(sales_volume) |
|---|---|---|
| Product A | sold | 800 |
| Product B | sold | 200 |
| Product C | sold | 300 |
| Product D | sold | 900 |
| Product A | outbound | 800 |
| Product B | outbound | 500 |
| Product C | outbound | 250 |
| Product D | outbound | 900 |