SELECT t.id, t.clientFk, c.email recipient, eu.email salesPersonEmail FROM ticket t JOIN client c ON c.id = t.clientFk LEFT JOIN account.emailUser eu ON eu.userFk = c.salesPersonFk WHERE t.id = ?