SQL to find employees who have the highest salary in their departments

By   Tewodros   Date Posted: Sep. 27, 2021  Hits: 1,045   Category:  Database   Total Comment: 0             A+ A-


side

In this exercise we are going to write a SQL to find employees who have the highest salary in their departments

 

 select * from Employee where salary in (

select  max(e.Salary)

from Employee e

  group by DepartmentId

  )


Tags



Back to Top



Related Blogs






Please fill all fields that are required and click Add Comment button.

Name:*
Email:*
Comment:*
(Only 2000 char allowed)


Security Code:* eaucxc

Back to Top