题解 | 更新用户积分信息?

更新用户积分信息?

https://www.nowcoder.com/practice/ef1f2fda4338460b948810f3f7e7a68e

with increment_point as(
    select user_id, sum(order_price) as point_increasing
    from order_tb
    where order_price>100
    group by user_id
)
select u.user_id, point+point_increasing as point
from uservip_tb u join increment_point i on u.user_id=i.user_id
order by point desc;

全部评论

相关推荐

02-25 13:02
中南大学 C++
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务