Showing posts with label 164 ) 3) Highest Salary of Each Department. Show all posts
Showing posts with label 164 ) 3) Highest Salary of Each Department. Show all posts

Monday, August 10, 2026

164 ) 3) Highest Salary of Each Department

 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

3) Highest Salary of Each Department

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Question: Write a query to display the highest salary of each department as department name and highest salary.

Query: 


SELECT 


    d.DepartmentName,


    MAX(e.Salary) AS HighestSalary


FROM Employees e


JOIN Departments d ON e.DepartmentID = d.DepartmentID


GROUP BY d.DepartmentName;

173 ) 14 ) Query to find duplicate rows of loan id but time is different

  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 14 )  Query to find duplicate rows of loan id but time is different  ~~~~~~~~~...