题解 | #获得积分最多的人(一)#
获得积分最多的人(一)
http://www.nowcoder.com/practice/1bfe3870034e4efeb4b4aa6711316c3b
select name,g.s_g from user join
(select user_id,sum(grade_num) s_g from grade_info where type='add' group by user_id) g
on user.id = g.user_id
order by g.s_g desc limit 1