[大厂真题]SQL 18题解 | 更新用户积分信息?
SELECT t.user_id,t.price+b.point as `point` from ( SELECT a.user_id,sum(a.order_price) as price FROM order_tb a where a.order_price>100 group by a.user_id ) t inner join uservip_tb b on t.user_id=b.user_id order by `point` desc