How is the correct way to search for aliases?
In the code below, I am creating an alias called (USER), within this column I am gathering all the values in the column (DE) and (PARA).
(SELECT *, de as user FROM mensagens WHERE user = '1' GROUP BY projeto ORDER BY data DESC)
UNION
(SELECT *, para as user FROM mensagens WHERE user = '1' GROUP BY projeto ORDER BY data DESC)
SQL online: http://sqlfiddle.com/#!9/d506b7/2