SELECT S,Sname,Sage,Ssex,score FROM ( SELECT t3.S,t4.Sname,t4.Sage,t4.Ssex,t3.score, DENSE_RANK() over(ORDER BY t3.score DESC ) rk FROM SC t3 LEFT JOIN Staff t4 ON t3.S = t4.S WHERE C = ( SELECT C FROM Course t1 LEFT JOIN Teacher t2 ON t1.T = t2.T WHERE t2.Tname = 'Tom' ) ) t5 where rk = 1 ORDER BY S

相关推荐

头像
昨天 11:39
四川大学 Java
是红鸢啊:忘了还没结束,还有字节的5k 违约金
点赞 评论 收藏
分享
牛客网
牛客企业服务