在原表上新添加一列,使用窗口函数排序(观察输出结果,使用逆序desc) select *,row_number() over(partition by job order by score desc) as t_rank from grade 参考考试分数(四)的答案,取其中中位数的位置 select job,round(count(id)/2) as 'start',round((count(id)+1)/2) as 'end' from grade group by job order by job 连接两表,最终结果 select a.id,a.job,a.score,a.t_ran...