感觉第二问和第一问考的一样啊,就是多来一次选最大而已 row_number()和max()都行 with temp as ( select t1.name, t1.subject, t1.score, ( case t1.subject when '语文' then 3 when '数学' then 2 when '英语' then 1 end ) as rk from Table t1 where (t1.name, t1.score) in ( select name, max(score) from Table t2 group by t2.name ) ) select t3.name, t3.subject, t3.score from temp t3 where (t3.name, t3.rk) in ( select t4.name, max(t4.rk) from temp t4 group by t4.name )
点赞 评论

相关推荐

求求要我吧:你教育经历放在下面干什么,而且27届还是28届啊()另外看你简历有两面,通常来说投递运营岗位一面简历就够了。另外个人总结要写也放在简历最下面,然后你奖项那里是2019年的哇哈哈,那你究竟投递的是社招还是实习?实习的话你是第几届是肯定要写出来的,社招的话你这个工作经历又太短太花了
点赞 评论 收藏
分享
牛客网
牛客网在线编程
牛客网题解
牛客企业服务