안녕하세요. 아래같이 해봤습니다.
with t (dt, nm, dep) as ( select '1일', 'A', 1 from dual union all select '2일', 'A', 3 from dual union all select '2일', 'B', 2 from dual union all select '3일', 'A', 5 from dual ) select dt, sum(a_dep) over( order by dt) a_dep_acc, a_dep, sum(b_dep) over( order by dt) b_dep_acc, b_dep from (select dt, sum(case when nm='A' then dep else 0 end) a_dep, sum(case when nm='B' then dep else 0 end) b_dep from t group by dt) t1