Skip to content
Advertisement

Find the manager details where all the employees under the manager should have salary more than 1000

Im having the table with records like below

and i need to get the manager details where the all the employees under the manager should have salary more than 1000

Advertisement

Answer

Here is a solution that uses a correlated subquery:

This ensures that:

  • the selected employee is a manager (ie they manage at least one employee)
  • all of the managees of the manager have a salary above (or equal to) 1000
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement