题解 | 商品销售排名

商品销售排名

https://www.nowcoder.com/practice/79c6c3d6d66946f79387bca73c0a29f4

with t1 as(select product_id,count(1) as num
from user_client_log
where step='select'
group by product_id)
select b.product_name,a.num*b.price as np
from t1 a join product_info b on a.product_id=b.product_id
order by np desc,b.product_name asc
limit 2

什么神人题目,没支付成功都算销售额,真牛,做假账一把好手。

全部评论

相关推荐

评论
点赞
收藏
分享

创作者周榜

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