G
Guest
The following is my table:
EmpId AutoNumber
FirstName
LastName
DeptId
Salary
This is my query to find the hignest salary in each dept. My question is how
can I find the employee who has the highest salay? I mean can I also get the
EmpId in the same query? I want to use a single statement. Please help.
Thanks.
SELECT Emp.DeptId, max(Emp.Salary)
FROM Emp
GROUP BY emp.deptid
EmpId AutoNumber
FirstName
LastName
DeptId
Salary
This is my query to find the hignest salary in each dept. My question is how
can I find the employee who has the highest salay? I mean can I also get the
EmpId in the same query? I want to use a single statement. Please help.
Thanks.
SELECT Emp.DeptId, max(Emp.Salary)
FROM Emp
GROUP BY emp.deptid