create table t(i int,a varchar2(2),d date); insert into t values(1,'b',to_date('2008-03-27 10:55:42','yyyy-mm-dd hh24:mi:ss')); insert into t values(1,'a',to_date('2008-03-27 10:55:46','yyyy-mm-dd hh24:mi:ss')); insert into t values(1,'d',to_date('2008-03-27 10:55:30','yyyy-mm-dd hh24:mi:ss')); insert into t values(2,'z',to_date('2008-03-27 10:55:55','yyyy-mm-dd hh24:mi:ss')); insert into t values(2,'t',to_date('2008-03-27 10:55:59','yyyy-mm-dd hh24:mi:ss')); commit; select i,ltrim(max(sys_connect_by_path(a,',')),',') a from ( select i,a,d,min(d) over(partition by i) d_min, (row_number() over(order by i,d))+(dense_rank() over (order by i)) numid from t ) start with d=d_min connect by numid-1=prior numid group by i; 这个简单,但是没法排列合并那列 select t.i, wm_concat(t.a) from t t group by t.i