select sb_sbzlxx.sbzl_dm sbzl_mc,
count(*) ynr,
sum(decode(sb.nsrsbh, null, 0, 1)) ysb,
sum(nvl(sb_se, 0)) ysbse,
count(*) - sum(decode(sb.nsrsbh, null, 0, 1)) yqwsb,
1 - sum(decode(sb.nsrsbh, null, 0, 1)) / count(*) sbl
from hd_hdxx hd,
sb_sbzlxx,
(select a.nsrsbh, a.sbzl_dm, sum(a.sb_se) sb_se
from sb_sbqk a
where a.sbny = '200702'
and a.sbzt_dm = '0000'
group by a.nsrsbh, a.sbzl_dm) sb
where sb_sbzlxx.nsrsbh = sb.nsrsbh(+)
and hd.nsrsbh = sb_sbzlxx.nsrsbh
and sb_sbzlxx.sbzl_dm = sb.sbzl_dm(+)
and hd.sbny = sb_sbzlxx.sbny
and (hd.sbny = '200702')
and (sb_sbzlxx.sbny = '200702')
and hd.swjg_dm like '113%'
group by sb_sbzlxx.sbzl_dmhd数据量140000左右
sb_sbzlxx数据量780000左右
sb_sbqk数据80000条左右
count(*) ynr,
sum(decode(sb.nsrsbh, null, 0, 1)) ysb,
sum(nvl(sb_se, 0)) ysbse,
count(*) - sum(decode(sb.nsrsbh, null, 0, 1)) yqwsb,
1 - sum(decode(sb.nsrsbh, null, 0, 1)) / count(*) sbl
from hd_hdxx hd,
sb_sbzlxx,
(select a.nsrsbh, a.sbzl_dm, sum(a.sb_se) sb_se
from sb_sbqk a
where a.sbny = '200702'
and a.sbzt_dm = '0000'
group by a.nsrsbh, a.sbzl_dm) sb
where sb_sbzlxx.nsrsbh = sb.nsrsbh(+)
and hd.nsrsbh = sb_sbzlxx.nsrsbh
and sb_sbzlxx.sbzl_dm = sb.sbzl_dm(+)
and hd.sbny = sb_sbzlxx.sbny
and (hd.sbny = '200702')
and (sb_sbzlxx.sbny = '200702')
and hd.swjg_dm like '113%'
group by sb_sbzlxx.sbzl_dmhd数据量140000左右
sb_sbzlxx数据量780000左右
sb_sbqk数据80000条左右
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货