By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
CREATE TABLE tablename (
a VARCHAR(3),
b VARCHAR(3),
c INTEGER
);
INSERT INTO tablename
(a, b, c)
VALUES
('AN8', 'USD', '99'),
('AN8', 'USD', null),
('AT0', 'EUR', null),
('AT0', 'EUR', null);
4 rows affected
select a, b
from tablename
group by a, b
having min(c) is null
a | b |
---|---|
AT0 | EUR |
Warning: Null value is eliminated by an aggregate or other SET operation.
select a, b
from tablename
group by a, b
having max(c) is null
a | b |
---|---|
AT0 | EUR |
Warning: Null value is eliminated by an aggregate or other SET operation.
select a, b
from tablename
group by a, b
having sum(c) is null
a | b |
---|---|
AT0 | EUR |
Warning: Null value is eliminated by an aggregate or other SET operation.
select a, b
from tablename
group by a, b
having avg(c) is null
a | b |
---|---|
AT0 | EUR |
Warning: Null value is eliminated by an aggregate or other SET operation.