test=# create table handel(symbol text primary key, stueck int);
CREATE TABLE
test=*# insert into handel values ('s1',1);
INSERT 0 1
test=*# insert into handel values ('s2',0);
INSERT 0 1
test=*# insert into handel values ('s3',NULL);
INSERT 0 1
test=*# select symbol, sum(stueck) from handel group by symbol having sum(stueck) = 0;
symbol | sum
--------+-----
s2 | 0
(1 row)
test=*#