By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
14 rows affected
| customer | item1 | item2 | item3 | item4 |
|---|---|---|---|---|
| 1 | 1000 | null | 1000 | 1000 |
| 2 | null | null | 2000 | 2000 |
| 3 | 1500 | null | 1500 | 2300 |
| 4 | 2300 | 1500 | 1000 | null |
Warning: Null value is eliminated by an aggregate or other SET operation.