日期:2014-05-18 浏览次数:20546 次
sum(case when day(OQCTime)=1 then BadNo else 0 end)/sum(case when day(OQCTime)=1 then floor(TestNo) else 0 end)*1000000 as [1],
sum(case when day(OQCTime)=1 then BadNo else 0 end)/nullif(sum(case when day(OQCTime)=1 then isnull(floor(TestNo),0) else 0 end)*1000000,0) as [1],