By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
3 rows affected
4 rows affected
| id | IdCust | Ref | Stock1 | Code1 | Price1 | Stock2 | Code2 | Price2 |
|---|---|---|---|---|---|---|---|---|
| 1 | 300 | 123 | 1 | A | 10 | 1 | A | 10 |
| 1 | 300 | 124 | 2 | A | 14 | 2 | A | 14 |
| 2 | 302 | 345 | 3 | C | 18 | 3 | C | 18 |
Warning: Null value is eliminated by an aggregate or other SET operation.