标签:sql ota count for rate cee led rom label
select t1.projectLabel,t1.modulLabel,t1.environment,t1.succeedcount,t2.failedcount,t1.succeedcount+t2.failedcount as totalcount,t1.succeedcount*1.0/(t1.succeedcount+t2.failedcount) as succeedrate
from
(select projectLabel,modulLabel,environment,count(1) as succeedcount
from
where op = ‘SUCCEED‘
group by projectLabel,modulLabel,environment) t1,
(select projectLabel,modulLabel,environment,count(1) as succeedcount
from
where op = ‘FAILED‘ group by projectLabel,modulLabel,environment) t2
where t1.projectLabel=t2.projectLabel and t1.modulLabel= t2.modulLabel and t1.environment = t2.environment
标签:sql ota count for rate cee led rom label
原文地址:http://www.cnblogs.com/jing99/p/7280300.html