0
I am trying to perform a query where all beings should be managers but they should not have worked on a project. It turns out that this john is the only being who works and manages a project and I must eliminate him from the query. But without success.
SELECT pessoa.primeiro_nome, projeto.nome
from pessoa INNER JOIN projeto
ON pessoa.id = projeto.id and pessoa.id != projeto.pessoa_gerente_id
WHERE projeto.id <> projeto.pessoa_gerente_id
also tried with this select but john continues
select distinct * from pessoa
Join projeto on pessoa.id = projeto.pessoa_gerente_id
WHERE projeto.nome IS NOT NULL
Could someone shed some light on how to solve this problem?
Here you can check the bank script
I performed a consultation that returned all beings with their respective projects, and some were null, Is this an inconsistency, or is it correct?
In fact, beings should be managers, but they should never have worked on a project.
– demmimur