不用joinselect user_id,name,grade_sumfrom(select * ,dense_rank() over (order by grade_sum desc) as rank1 from (select user_id,(select name from user where grade.user_id=user.id) name, sum(grade_num) grade_sum from grade_info grade group by user_id) a) bwhere rank1<=1