update tb t set (e01,e02,e03)=(select sum(e01),sum(e02),sum(e03) from tb where unit in ('A','B') and t.u01=u01 and t.u02=u02) where unit='C';
update tb t set (e01,e02,e03)= ( select sum(e01),sum(e02),sum(e03) from tb group by u01,u02 where unit in ('A','B') and t.u01=tb.u01 and t.u02=tb.u02) where unit='C';
update tb t set
(e01,e02,e03)=(select sum(e01),sum(e02),sum(e03)
from tb where unit in ('A','B') and t.u01=u01 and t.u02=u02)
where unit='C';
update tb t
set (e01,e02,e03)=
(
select sum(e01),sum(e02),sum(e03)
from tb
group by u01,u02
where unit in ('A','B')
and t.u01=tb.u01 and t.u02=tb.u02)
where unit='C';