题解 | 统计各等级会员用户下订单总额
select vip, ifnull(sum(order_price),0) order_total from order_tb a right join uservip_tb b using(user_id) group by vip order by order_total desc
select vip, ifnull(sum(order_price),0) order_total from order_tb a right join uservip_tb b using(user_id) group by vip order by order_total desc
相关推荐