你直接在数据集里面用sql的distinct不就行了?
select distinct 电话,姓名 from 表名称
-----------下拉用group by 取最大日期一条-------------------
select t.name_s,t.hm,max(t.mytime) as mytime from (
select '张三' as name_s,'10086' as hm,'2023-07-01' as mytime from dual
union all
select '张三' as name_s,'10086' as hm,'2023-07-04' as mytime from dual
union all
select '张三' as name_s,'10086' as hm,'2023-07-05' as mytime from dual
union all
select '李明' as name_s,'1008611' as hm,'2023-07-10' as mytime from dual
) t
group by t.name_s,t.hm
--------------