3 ms·
Like this. There is more than one way to do it: -- List employees who have the biggest salary -- in their departments select Name from Empl
by genwin 13y ago
Like this. There is more than one way to do it:
-- List employees who have the biggest salary
-- in their departments
select
Name
from
Employees e1
where
exists
(
select
1
from
Employees e2
where
e2.DepartmentID = e1.DepartmentID
having
max(e2.Salary) = e1.Salary
)