I have a table EmpDetails:
EmpDetails
DeptID EmpName Salary Engg Sam 1000 Engg Smith 2000 HR Denis 1500 HR
The below listed query will list highest salary in each department.
select deptname, max(salary) from department, employee where department.deptno=employee.deptno group by deptname;
I executed this query successfully on Oracle database.