Write a query for Earning of employees more than their managers.
Example
Table: EmployeeID NAME Salary ManagerID1 Ram 70000 32 Shyam 80000 43 Sheeta 60000 NULL4 Geeta 85000 NULLResult: Ram
Mysql
select e.Name as Employeefrom Employee e joinEmployee e1 on (e.ManagerId=e1.Id)where e.Salary>e1.Salary;
No comments:
Post a Comment