By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
3 rows affected
| carId | carType | Code | Type | value |
|---|---|---|---|---|
| Z001 | Company | D | Brakes | New |
| Z001 | Company | E1 | Doors | Upgraded |
| Z002 | Company | D | Brakes | null |
| Z002 | Company | E1 | Doors | null |
| Z003 | Company | D | Brakes | USed |
| Z003 | Company | G7 | Tires | New |
| carId | carType | BrakesCode | DoorsValue |
|---|---|---|---|
| Z001 | Company | D | Upgraded |
| Z002 | Company | D | null |
| Z003 | Company | D | null |
Warning: Null value is eliminated by an aggregate or other SET operation.