日期:2014-05-17 浏览次数:20794 次
select b.xm_naem as label,nvl(sum(rfs),0) as value from tb_khxx_ry a,tb_kk b where b.xmid=a.rbigid(+) and rryid(+) in ('008','163') and b.bmid='04171113' and to_char(rupdatetime(+), 'YYYY')='2012' group by b.xm_naem,b.xmid
select
b.xm_naem as label
,
nvl(select sum(rfs as value
from tb_khxx_ry a
where b.xmid=a.rbigid
and a.rryid in ('008','163')
and to_char(a.rupdatetime, 'YYYY')='2012'
),0)
from tb_kk b
where b.bmid='04171113'
group by b.xm_naem,b.xmid