题解 | #获得积分最多的人(二)#
获得积分最多的人(二)
http://www.nowcoder.com/practice/b6248d075d2d4213948b2e768080dc92
select user_id,name,s from (select user_id,name,sum(grade_num) as s,m from grade_info as gi,user as u,(select sum(grade_num)as m from grade_info group by user_id order by m desc limit 1) as recorder where gi.user_id=u.id group by user_id)as result where s=m order by s desc