条件直接加呗,用in或exists
(SELECT aaa, bbb, sum(ccc) from 表A
where exists(select 1 from 表B
where 表B.aaa= 表A.aaa and 表B.bbb= 表A.bbb
and 表B的其他条件
)
group by aaa, bbb) 表TEMP
(SELECT aaa, bbb, sum(ccc) from 表A
where exists(select 1 from 表B
where 表B.aaa= 表A.aaa and 表B.bbb= 表A.bbb
and 表B的其他条件
)
group by aaa, bbb) 表TEMP
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货