with g as(
    select user_id,sum(grade_num) gn
    from grade_info
    where type='add'
    group by user_id
) 
select g.user_id,u.name,gn
from g join user u on g.user_id=u.id
where g.gn=(
    select max(gn)
    from g
);