17,086
社区成员
发帖
与我相关
我的任务
分享
select type,Substr(Max(Sys_Connect_By_Path(name, '|')), 2) name
from (select t.*,row_number()over(partition by type order by id)rn from tab1 t)
start with rn=1
connect by rn-1=prior rn
and type=prior type
group by type