Simple Apprach


  • 0
    R

    '''select a.name from Employee a where a.salary>(select b.salary from Employee b where b.id=a.managerid)'''

    This gives all the employees whose salary is greater than his manager. Let me know if this is having some perf issues or this can be handled in an optimized manner


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.