How to merge these two SELECTS?
SELECT *
FROM doacao d
LEFT JOIN foto f ON (d.iddoacao = f.iddoacao)
WHERE (d.idbeneficiario IS NULL);
SELECT email
FROM doador dd
INNER JOIN doacao d ON (dd.iddoador = d.iddoador)
WHERE (dd.iddoador IS NOT NULL)
AND (d.idbeneficiario IS NULL);