SQL statement - the total cost of the query is case No. 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

Guess you like

Origin www.cnblogs.com/dongyaotou/p/12173484.html