Good afternoon guys, I'm new to the forum and I have a problem, I think it's simple in sql, it duplicates the result, can anyone help me?
SELECT DISTINCT
o.id,
s.id,
s.servico,
s.descricao,
s.valor,
s.orcamento_id,
p.id,
p.nome,
p.quantidade,
p.valor_unitario,
p.valor_total,
p.orcamento_id
FROM
servico AS s
INNER JOIN pecas AS p
INNER JOIN orcamento AS o
WHERE o.id = 2
AND s.orcamento_id = o.id
AND p.orcamento_id = o.id