按月份統計每個月的訂單總金額SQL語句解析

一.SQL語句: select              IFNULL(sum(case month(createTime) when '1' then price else 0 end), 0) as 一月份,             IFNULL(sum(case month(createTime) when '2' then price else 0 end), 0) as 二月份,   
相關文章
相關標籤/搜索