Forum

SQL Query to Find t...
 
Share:
Notifications
Clear all

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

2 Posts
2 Users
0 Reactions
1,318 Views
Posts: 27
Admin
Topic starter
(@vinodkrsetty)
Eminent Member
Joined: 7 years ago

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

Please help. 


1 Reply
Posts: 18
 VK
Admin
(@vinodkrsetty5895)
Active Member
Joined: 6 years 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

Leave a reply

Author Name

Author Email

Title *

 
Preview 0 Revisions Saved
Share: