34,592
社区成员
发帖
与我相关
我的任务
分享
select ca,sum(da)da
from (
select ca,da from t_A
union all
select ca,da from t_B
)t
group by ca
select Ca as Cc,Da as CC from t_A
union
select Cb as Cc,Db as CC from t_B
select CC,Sum(Dc) DC from
(select Ca CC,Da DC from t_A union all
select Cb,Db from t_B B ) C Group by CC
select ca,sum(da)da
from (
select ca,da from t_A
union all
select ca,da from t_B
)t
group by ca