Consider the following query:
SELECT *
FROM employee e
INNER JOIN salary s
ON e.id = s.employee_id
WHERE s.to_date is NULL
AND e.id NOT IN (10001, 10002, 10003);
Change the order of the lines to make it a valid execution plan.
First of all we're looking up on employee. Remember that the execution starts from the bottom of the tree.