MySQL sum聚合函数
select sum(if(money > 0, money, 0)) as money from total_money
意思是如果money > 0, 将money的值累加到total_money, 否则将0累加到total_money
select sum(if(money > 0, money, 0)) as money from total_money
意思是如果money > 0, 将money的值累加到total_money, 否则将0累加到total_money