only a sql

select a.id,a.name,a.score
from temp a,(select name,max(score) as max_score from temp group by name) b
where a.name =b.name
and a.score=b.max_score

Published At
Categories with 数据库类
Tagged with
comments powered by Disqus