Forum

SQL Query to Find t...
 
Notifications
Clear all

SQL Query to Find the employee details who are earning more than their supervisor?


KV Kumar
Posts: 27
Admin
Topic starter
(@vinodkrsetty)
Member
Joined: 2 years ago

How to find the employees details who are earning more than their supervisor?

Please help. 

1 Reply
VK
Posts: 17
 VK
(@vinodkrsetty5895)
Active Member
Joined: 1 year ago

You can use below query to achieve this.

SELECT employee.*
FROM your_table_name AS employee
JOIN your_table_name AS manager ON manager.EMPNO = employee.MGR
WHERE employee.SAL > manager.SAL

Reply
Share: