题解 | 商品销售排名

商品销售排名

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

select
    p.product_name,
    cast(sum(p.price) as unsigned) as total
from
    user_client_log uc
    left join product_info p on uc.product_id = p.product_id
where
    uc.step = 'select'
    and uc.pay_method is not null
group by
    product_name
order by
    total desc,
    product_name desc
limit
    2;

没看出过滤条件

全部评论

相关推荐

12-13 12:11
复旦大学 Java
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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