LEFT JOIN employees e ON e.department_id = d.id ...