select count(case when is_gold_order = 2 then 1 end) as ‘a’,count(case
when is_gold_order = 4 then 1 end) as ‘b’,count(case when
is_gold_order = 3 then 1 end) as ‘c’,count(case when is_refund = 1
then 1 end) as ‘d’ from orders where user_id = 1172 GROUP BY goods_id
Mysql函数使用case
最新推荐文章于 2022-10-14 11:15:33 发布