Note the use of group by and having clauses
select a.clmno,sum(a.realpay) from llclaimdetail a where 1=1 group by a.clmno having sum(a.realpay)=0
Note the use of group by and having clauses
select a.clmno,sum(a.realpay) from llclaimdetail a where 1=1 group by a.clmno having sum(a.realpay)=0