create table t1(
ID INT,
NAME varchar2(10)
);
insert into t1 values(1,'aaa');
insert into t1 values(2,'bbb');
insert into t1 values(5,'ccc');
insert into t1 values(3,'ddd');
commit;
(一)
select NAME, max(r)
from (select NAME, wm_concat(ID) over (partition by NAME order by ID) r from t1)
group by NAME ;
(二)
SELECT WMSYS.WM_CONCAT(NAME) NAME,WMSYS.WM_CONCAT(ID) ID from t1 group by NAME,ID;
select distinct wm_concat(name) over(partition by .. order by ..
rows between unbounded preceding and unbounded following) aa,
wm_concat(name) over(partition by .. order by ..
rows between unbounded preceding and unbounded following) bb from table