用分析函数
select * form (
select a.*, row_number over(partition by 分组条件 order by 排序字段) rk from a)
where rk=1