Mysql SUM 加条件

-- 统计状态为Paid总数量
SUM(IF(`status` = 'Paid',amount,0))

 

posted @ 2020-10-22 15:44  $Elvin  阅读(978)  评论(0)    收藏  举报