看看对不对:select id as '识别号',mc as '名称',sbrq,xse,kprq,se
from table1 a
(select id,sum(xse) xse,sbrq from table2 where substr(to_char(sbrq,'yyyy-mm-dd'),6,2)=substr(to_char(sysdate,'YYYY-mm-dd'),6,2) group by id,sbrq) b
(select id,sum(se) se,kprq from table3 where substr(to_char(sbrq,'yyyy-mm-dd'),6,2)=substr(to_char(sysdate,'YYYY-mm-dd'),6,2) group by id,kprq) c
where a.id=b.id and a.id=c.id
from table1 a
(select id,sum(xse) xse,sbrq from table2 where substr(to_char(sbrq,'yyyy-mm-dd'),6,2)=substr(to_char(sysdate,'YYYY-mm-dd'),6,2) group by id,sbrq) b
(select id,sum(se) se,kprq from table3 where substr(to_char(sbrq,'yyyy-mm-dd'),6,2)=substr(to_char(sysdate,'YYYY-mm-dd'),6,2) group by id,kprq) c
where a.id=b.id and a.id=c.id
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货