0 then 1 end) dentro,
count(case when (cl.pontuacao = 0) and (cl.naoaplicavel = 'Não') then 1 end) fora,
(Select count(case when (a.pontuacao = 0) and (a.naoaplicavel = 'Não') then 1 end) from auditoria_execucao_lista a, auditoria_execucao_questoes b, auditoria_coleta c where c.chave_questao = b.chave_item and cast(a.chave_item_lista as "varchar"(20)) = c.resposta and c.chave_processo = $P{audit}) totalfora
from auditoria_coleta cc, auditoria_execucao_questoes cq, auditoria_execucao_lista cl
where cc.chave_processo = $P{audit} and cc.chave_questao = cq.chave_item and cast(cl.chave_item_lista as "varchar"(20)) = cc.resposta group by rtrim(cq.tag_id3)]]>
0 then 1 end) dentro,
count(case when (cl.pontuacao = 0) and (cl.naoaplicavel = 'Não') then 1 end) fora,
sum(case when (cl.pontuacao = 0) and (cl.naoaplicavel = 'Não') then 1 end) totfora
from auditoria_coleta cc, auditoria_execucao_questoes cq, auditoria_execucao_lista cl
where cc.chave_processo = $P{audit} and cc.chave_questao = cq.chave_item and cast(cl.chave_item_lista as "varchar"(20)) = cc.resposta group by cq.tag_id]]>
0 then 1 end) dentro,
count(case when (cl.pontuacao = 0) and (cl.naoaplicavel = 'Não') then 1 end) fora,
sum(case when (cl.pontuacao = 0) and (cl.naoaplicavel = 'Não') then 1 end) totfora
from auditoria_coleta cc, auditoria_execucao_questoes cq, auditoria_execucao_lista cl
where cc.chave_processo = $P{audit} and cc.chave_questao = cq.chave_item and cast(cl.chave_item_lista as "varchar"(20)) = cc.resposta group by cq.tag_id, cq.tag_id2 order by 1,2]]>
0.79 ? "OK" : "NÃO OK"]]>
0.79 ? "OK" : "NÃO OK"]]>
0.79 ? "OK" : "NÃO OK"]]>
0.79 ? "OK" : "NÃO OK"]]>
0.79 ? "OK" : "NÃO OK"]]>
0.79 ? "OK" : "NÃO OK"]]>