MySQL sum聚合函数时间:2021-12-20 22:52:47select sum(if(money > 0, money, 0)) as money from total_money 意思是如果money > 0, 将money的值累加到total_money, 否则将0累加到total_money