select 'ANTES' AS DescricaoDesc,
sum(totalErros) as RegistrosReg,
sum(tipoErros) as Itens,
count(*) as Empresas
from
(
select nuSerie, sum(qtd) as totalErros, count(*) as tipoErros
from esanTesteAuditorErroInicio
where tipoValidacao = 'V'
group by nuSerie
)
union
select 'DEPOIS' as descricaodesc,
sum(totalErros) as RegistrosReg,
sum(tipoErros) as Itens,
count(*) as Empresas
from
(
select nuSerie, sum(qtd) as totalErros, count(*) as tipoErros
from esanTesteFirebirdErro
where tipoValidacao = 'V'
group by nuSerie
)
|