Posts

Showing posts with the label Max and Min from respective group

8 - Filtering Max or Minimum Salary from each Department(Group By)

Image
  ORIGINAL LIST Filter the Maximum Salary and Its details from Each Department select * from employees where salary in ( select max (salary) from employees group by department); Filter the  Minimum Salary and Its details from Each Department select * from employees where salary in ( select min (salary) from employees group by department);