3,491
社区成员
发帖
与我相关
我的任务
分享
select t.code,substr(max(sys_connect_by_path(t.sz,',')),2) sz
from
(select code,sz,row_number()over(partition by code order by sz) rn from (select * from prdsz where rownum<100)) t
start with t.rn=1
connect by t.code=prior t.code
and t.rn-1=prior t.rn
group by t.code;