Filtro Refinado totalizando na consulta

Senhores, o filtro refinado na minha consulta apresenta um quantitativo, mas quando clico retorna uma consulta vazia. Já limpei temporários e nada. Os itens não existem mas continuam aparecendo na consulta, não sei como resolver…

Coloca em
Modo debug.

Vejas as querys que está rodando.

Precisa ver seu SQL principal também se tem
Left join ou right join.

Haroldo, a informação contabilizada não existe mais no banco de dados. Eu modifiquei, mas mesmo assim ele continua no filtro contabilizando …

Obrigado pela resposta.

Apresente seu SQL principal aqui

(pdo-mysql): select acoesafirm, COUNT(*) AS countTest from res_tudo GROUP BY acoesafirm order by acoesafirm ASC

SQL do item do filtro com problema, no BANCO Não existe mais nada.

Agora retorno modo debug da consulta vazia, após clicar em filtro com quantidade, mas sem nada no banco.
(pdo-mysql): select count() from res_tudo where ((acoesafirm IN (‘AMPLACONCORRÊNCIA’)))
(pdo-mysql): SELECT id, edital, proponente, titulopropost, municipio, pontuacao, resultado, seq from res_tudo where ((acoesafirm IN (‘AMPLACONCORRÊNCIA’))) order by id asc LIMIT 0,12
(pdo-mysql): select edital, COUNT(
) AS countTest from res_tudo where ((acoesafirm IN (‘AMPLACONCORRÊNCIA’))) GROUP BY edital order by edital ASC
(pdo-mysql): select resultado, COUNT() AS countTest from res_tudo where ((acoesafirm IN (‘AMPLACONCORRÊNCIA’))) GROUP BY resultado order by resultado ASC
(pdo-mysql): select municipio, COUNT(
) AS countTest from res_tudo where ((acoesafirm IN (‘AMPLACONCORRÊNCIA’))) GROUP BY municipio order by municipio ASC
(pdo-mysql): select territident, COUNT() AS countTest from res_tudo where ((acoesafirm IN (‘AMPLACONCORRÊNCIA’))) GROUP BY territident order by territident ASC
(pdo-mysql): select acoesafirm, COUNT(
) AS countTest from res_tudo where ((acoesafirm IN (‘AMPLACONCORRÊNCIA’))) GROUP BY acoesafirm order by acoesafirm ASC
(pdo-mysql): select acoesafirm, COUNT() AS countTest from res_tudo where ((acoesafirm IN (‘AMPLACONCORRÊNCIA’))) GROUP BY acoesafirm order by acoesafirm ASC
(pdo-mysql): select edital, COUNT(
) AS countTest from res_tudo where ((acoesafirm IN (‘AMPLACONCORRÊNCIA’))) GROUP BY edital order by edital ASC
(pdo-mysql): select resultado, COUNT() AS countTest from res_tudo where ((acoesafirm IN (‘AMPLACONCORRÊNCIA’))) GROUP BY resultado order by resultado ASC
(pdo-mysql): select municipio, COUNT(
) AS countTest from res_tudo where ((acoesafirm IN (‘AMPLACONCORRÊNCIA’))) GROUP BY municipio order by municipio ASC
(pdo-mysql): select territident, COUNT(*) AS countTest from res_tudo where ((acoesafirm IN (‘AMPLACONCORRÊNCIA’))) GROUP BY territident order by territident ASC

Retorno da consulta clicando em filtro com dados no banco,

(pdo-mysql): select count() from res_tudo where ((acoesafirm IN (‘AMPLA CONCORRÊNCIA’)))
(pdo-mysql): SELECT id, edital, proponente, titulopropost, municipio, pontuacao, resultado, seq from res_tudo where ((acoesafirm IN (‘AMPLA CONCORRÊNCIA’))) order by id asc LIMIT 0,12
(pdo-mysql): select edital, COUNT(
) AS countTest from res_tudo where ((acoesafirm IN (‘AMPLA CONCORRÊNCIA’))) GROUP BY edital order by edital ASC
(pdo-mysql): select resultado, COUNT() AS countTest from res_tudo where ((acoesafirm IN (‘AMPLA CONCORRÊNCIA’))) GROUP BY resultado order by resultado ASC
(pdo-mysql): select municipio, COUNT(
) AS countTest from res_tudo where ((acoesafirm IN (‘AMPLA CONCORRÊNCIA’))) GROUP BY municipio order by municipio ASC
(pdo-mysql): select territident, COUNT() AS countTest from res_tudo where ((acoesafirm IN (‘AMPLA CONCORRÊNCIA’))) GROUP BY territident order by territident ASC
(pdo-mysql): select acoesafirm, COUNT(
) AS countTest from res_tudo where ((acoesafirm IN (‘AMPLA CONCORRÊNCIA’))) GROUP BY acoesafirm order by acoesafirm ASC
(pdo-mysql): select acoesafirm, COUNT() AS countTest from res_tudo where ((acoesafirm IN (‘AMPLA CONCORRÊNCIA’))) GROUP BY acoesafirm order by acoesafirm ASC
(pdo-mysql): select edital, COUNT(
) AS countTest from res_tudo where ((acoesafirm IN (‘AMPLA CONCORRÊNCIA’))) GROUP BY edital order by edital ASC
(pdo-mysql): select resultado, COUNT() AS countTest from res_tudo where ((acoesafirm IN (‘AMPLA CONCORRÊNCIA’))) GROUP BY resultado order by resultado ASC
(pdo-mysql): select municipio, COUNT(
) AS countTest from res_tudo where ((acoesafirm IN (‘AMPLA CONCORRÊNCIA’))) GROUP BY municipio order by municipio ASC
(pdo-mysql): select territident, COUNT(*) AS countTest from res_tudo where ((acoesafirm IN (‘AMPLA CONCORRÊNCIA’))) GROUP BY territident order by territident ASC

Desde já agradeço.

pode colar aqui o SQL principal da Aplicação?