题目如图:
模拟题目建的表如下图:
答案:
select t3.id,t3.name,max(t3.score) from (
select t1.* from b t1,(select id,max(score) score from b group by id) t2 where t1.id=t2.id and t1.score<t2.score
) t3 group by t3.id;
本文转自屌丝逆袭博客51CTO博客,原文链接http://blog.51cto.com/5731674/1768128如需转载请自行联系原作者
_追随我心