select a.sxh,sum(decode(a.sz,'01',a.se,0)) as test1,sum(decode(a.sz,'02',a.se,0)) as test2
from (
select sxh,nsrmc,sz,se from GG
union all
select id as sxh,nsrmc,sz,se from YY
) a
group by a.sxh;
from (
select sxh,nsrmc,sz,se from GG
union all
select id as sxh,nsrmc,sz,se from YY
) a
group by a.sxh;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货