In this MySQL challenge, your query should return the information for the employee with the third highest salary. Write a query that will find this employee and return that row, but then replace the DivisionID column with the corresponding DivisionName from the table cb_companydivisions. You should also replace the ManagerID column with the ManagerName if the ID exists in the table and is not NULL.
Thanks for the answer ... I have the 3rd Highest Salary but how to solve
eplace the DivisionID column with the corresponding DivisionName from the table cb_companydivisions. You should also replace the ManagerID column with the ManagerName if the ID exists in the table and is not NULL.
Hello Mo,
You are a life saver but would like to give some explanation of this please,
SELECT a.ID,a.Name,DivisionName,a.Name as ManagerName,a.Salary
FROM maintable_4EMTN as a
INNER JOIN cb_companydivisions as b
ON a.DivisionID=b.ID
ORDER BY Salary DESC
LIMIT 1
OFFSET 2
If i type this i get the correct result but with a wrong manager name (which is the same as the name of the employee instead of his manager)?Can you tell me what is your 2nd inner join doing exactly cuz i am a bit confused
Thanks in advance!