日期:2014-05-18 浏览次数:20542 次
select sum(b.回访结果) from 维修表 a,回访 b where a.维修单号=b.业务编号 and a.完工日期 between '2012-01-01 00:00:00' and '2012-01-31 23:59:59'
select distinct b.业务编号 from 维修表 a,回访 b where a.维修单号=b.业务编号 and a.完工日期 between '2012-01-01 00:00:00' and '2012-01-31 23:59:59'
select sum(b.回访结果) from 维修表 a,回访 b where a.维修单号=b.业务编号 and a.完工日期 between '2012-01-01 00:00:00' and '2012-01-31 23:59:59' and not exists (select 1 from 回访 where b.业务编号 = 业务编号 and id < b.id)