题解 | 商品销售排名

商品销售排名

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

with
t1 as(
    select
        product_name,
        sum(price) as total
    from
        user_client_log left join product_info using(product_id)
    where
        step='select'
    group by
        product_id
    order by
        total desc
)

select
    product_name,
    convert(total,signed)
from
    t1

全部评论

相关推荐

评论
点赞
收藏
分享

创作者周榜

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