I need to make an appointment where the calls that were not validated are listed. It works like this:
A call is a support request, in which several actions occur, and all are recorded in an auxiliary table.
I need to filter out all the calls that did not have registered code action 140, for example.
My query looks like this:
select chamados from tb_chamados
inner join tb_acoes on tb_acoes.cod_chamado = tb_chamados.cod_chamado
where tb_acoes.acao <> 140
The problem is that the result of this query only ignores the records where the action is equal to 140 and brings the others.
But I want the query to bring me the calls where in the records of his actions there is not one that has the 140 code.