摘要: 1.sum与if结合使用 如图:数据表中,count_money 字段可为正,可为负。为正表示收入,负表示支出。 统计总收入,总支出。 select sum(if(count_money > 0, count_money, 0)) as sum_receipt, sum(if(count_money 阅读全文
posted @ 2021-09-08 21:03 皮卡丘和羊宝贝😄 阅读(1263) 评论(0) 推荐(0) 编辑