Forum

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

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


Posts: 27
Admin
Topic starter
(@vinodkrsetty)
Eminent Member
Joined: 6 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: 4 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

Self Learning Video Tutorials - Software Course

Leave a reply

Author Name

Author Email

Title *

 
Preview 0 Revisions Saved
Share: