题解 | 商品价格排名

商品价格排名

https://www.nowcoder.com/practice/119f5b8cfe5b45779a3e1b3f4d83b341

SELECT a.product_id,a.product_name,a.type,a.price
FROM(
    SELECT *,DENSE_RANK() OVER(partition by type order by price DESC) ranking
    FROM product_info
) a
WHERE a.ranking IN(1,2)
ORDER BY a.price DESC,a.product_id
LIMIT 3;

全部评论

相关推荐

白火同学:能。我当初应届沟通了1200,收简历50,面试10左右吧,加油投吧
点赞 评论 收藏
分享
LemontreeN:有的兄弟有的我今天一天面了五场,4个二面一个hr面
投递字节跳动等公司10个岗位
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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