select 
    l.solicitacao_id
FROM
    d_lancamentos l
where 
(SELECT SUM(`Lancamento`.valor) AS `count` 
FROM `d_lancamentos` AS `Lancamento` 
WHERE `Lancamento`.`creditado_para` IN (404, 42, 43, 400, 401, 402, 50, 51, 405, 460, 461, 406, 464, 465, 403) 
AND `Lancamento`.`aprovado` IN(0,1)
AND `Lancamento`.solicitacao_id=l.solicitacao_id
)
<>
(SELECT SUM(`Lancamento`.valor) AS `count` 
FROM `d_lancamentos` AS `Lancamento` 
WHERE `Lancamento`.`debitado_de` IN (404, 42, 43, 400, 401, 402, 50, 51, 405, 460, 461, 406, 464, 465, 403) 
AND `Lancamento`.`aprovado` IN(0,1)
AND `Lancamento`.solicitacao_id=l.solicitacao_id
)
GROUP BY l.solicitacao_id;

-- ocorrencia
select 
    l.solicitacao_id
FROM
    d_lancamentos l
where 
(SELECT SUM(`Lancamento`.valor) AS `count` 
FROM `d_lancamentos` AS `Lancamento` 
WHERE `Lancamento`.`creditado_para` IN (464, 465, 406) 
AND `Lancamento`.`aprovado` IN(0,1)
AND `Lancamento`.solicitacao_id=l.solicitacao_id
)
<>
(SELECT SUM(`Lancamento`.valor) AS `count` 
FROM `d_lancamentos` AS `Lancamento` 
WHERE `Lancamento`.`debitado_de` IN (464, 465, 406) 
AND `Lancamento`.`aprovado` IN(0,1)
AND `Lancamento`.solicitacao_id=l.solicitacao_id
)
GROUP BY l.solicitacao_id;