sql如下:
    select
distinct
year1,
month1,
'33' day1,
'' indiNo,
divNo ,
'' DivName,
'本月累计' Abstract,
(
select sum(realIndiMoney)
from ns_target_detial_xc1 x
where x.month1<=t.month1 and x.year1=t.year1 and x.divNo=t.divNo
) as realIndiMoney,
(
select sum(normalFee) from ns_target_detial_xc1 x
where x.month1<=t.month1 and x.year1=t.year1 and x.divNo=t.divNo
) as normalFee ,
(
select sum(buy) from ns_target_detial_xc1 x
where x.month1<=t.month1 and x.year1=t.year1 and x.divNo=t.divNo
) as buy ,
(
select sum(repair) from ns_target_detial_xc1 x
where x.month1<=t.month1 and x.year1=t.year1 and x.divNo=t.divNo
)as repair ,
(
select sum(operate) from ns_target_detial_xc1 x
where x.month1<=t.month1 and x.year1=t.year1 and x.divNo=t.divNo
) as operate 
from ns_target_detial_xc1 t