用case when讲grade改成带正负的 2. groupby id + sum() 3. dense_rank = 1select id, name, grade_sum from (SELECT t2.user_id as id, t3.name as name, t2.sum2 as grade_sum, dense_rank() over (order by t2.sum2 desc) as dr from (select user_id, sum(grade_num) as sum2 from (select user_id, type, c...