By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
CREATE TABLE
INSERT 0 3
| ctid | part_number | customer | qty_2012_01 | qty_2012_02 | qty_2012_03 |
|---|---|---|---|---|---|
| (0,1) | a | b | 11 | null | 33 |
| (0,2) | c | d | null | 22 | null |
| (0,3) | e | f | 44 | 55 | 66 |
SELECT 3
DO
| ctid | part_number | customer | qty_2012_01 | qty_2012_02 | qty_2012_03 |
|---|---|---|---|---|---|
| (0,3) | e | f | 44 | 55 | 66 |
| (0,4) | a | b | 11 | 0 | 33 |
| (0,5) | c | d | 0 | 22 | 0 |
SELECT 3
| c1 | c2 | c3 | fail1 | fail2 | bingo | bingo_faster | bingo_slower |
|---|---|---|---|---|---|---|---|
| null | 1 | null | f | f | t | t | t |
| 1 | 1 | 1 | f | t | f | f | f |
| null | null | null | t | f | t | t | t |
SELECT 3