select user_id,name,sum from ( select user_id,name,sum(if(type='reduce',-1grade_num,grade_num))as sum, (select sum(if(type='reduce',-1grade_num,grade_num))as s from grade_info group by user_id order by s desc limit 1) as max from grade_info as gi,user as u where gi.user_id=u.id group by gi.user_id o...