row_number() over(order by sort desc)应用场景:比如学员成绩表中有userid,username,sorce登字段,需要取出学员成绩的名次:表中没有名次字段,只有分数select userid,username,sorce,row_number() over(order by sort desc) as MingCi from UserSorce这样就能取出高分到低分所有学员的名次来了。