摘要: 1.sum与if结合使用 如图:数据表中,count_money 字段可为正,可为负。为正表示收入,负表示支出。 统计总收入,总支出。 select sum(if(count_money > 0, count_money, 0)) as sum_receipt, sum(if(count_money 阅读全文
posted @ 2019-11-28 19:15 子夜的流星 阅读(4385) 评论(0) 推荐(0)