select * from ( select tmp.*, row_number() over(PARTITION BY 分組字段 order by 排序字段 desc) as rn from tablename tmp ) where rn = 1排序