
The inner query in Q1 will select the employee having max salary from all other employees in all departments(this will return the max salaried employee in the entire company which belongs to dept 5), and outer query will select all employees not in the inner query. Is this interpretation right?
In Q2, inner query gives a list of all salaries of employees in dept 5, and outer query selects those employees from entire company who have salary greater than anyone in dept 5.
Why is the answer Q1 and not Q2?