select temp.* from (SELECT *,Row_Number() OVER (partition by 分组字段 ORDER BY 排序字段 desc) as rank FROM user_task_tb where 条件) temp where rank = 1