这样试试
select isnull(count(x.bit_id),0) from
(select xs.bit_customer_id from VEH_SaleOrder xs
union select jxs.bit_customerid from VEH_DealSellInfo jxs
) hj left outer join veh_vehicle veh
on hj.bit_customer_id=veh.bit_customer_id
left outer join base_modal z on veh.bit_carmodel = z.bit_id
left outer join base_series y on z.bit_seriesid=y.bit_id
left outer join base_band x on y.bit_bandid=x.bit_id
select isnull(count(x.bit_id),0) from
(select xs.bit_customer_id from VEH_SaleOrder xs
union select jxs.bit_customerid from VEH_DealSellInfo jxs
) hj left outer join veh_vehicle veh
on hj.bit_customer_id=veh.bit_customer_id
left outer join base_modal z on veh.bit_carmodel = z.bit_id
left outer join base_series y on z.bit_seriesid=y.bit_id
left outer join base_band x on y.bit_bandid=x.bit_id
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货