Get The Lowest Date if The other Column is Null
Here is what I came up with

SELECT employee_id, from_date, to_date
FROM employees AS e1
WHERE to_date IS NOT NULL -- may not be useful as per comments.
  AND to_date - from_date &lt;= (365 * 3)
  AND EXISTS (
    SELECT
    FROM employees AS e2
    WHERE e1.employee_id = e2.employee_id
    GROUP BY employee_id
    HAVING e1.from_date = min(e2.from_date)
  );