How do I do exactly so that this Valuation value column does not have its values duplicated, ie instead of four result lines there would be only two.
SELECT p.nome,
d.nome,
c.valorAuxilio
FROM sca_pessoa p
INNER JOIN sca_dependente d ON p.idPessoa = d.idPessoa
INNER JOIN sispro_contrato c ON p.idPessoa = c.idPessoa
WHERE p.nome LIKE '%ADEMAR MAGA%'
AND c.idSituacaoContrato = 3 ORDER BY c.valorAuxilio;