I need help with a query.
Table 1: Employees
Table 2: Departments
The goal is to create a list of department names, the manager id, last name of mgr, and average salary for each department.
I know I have to join the empl and dept tables to each other and then somehow join the employees table to itself.
I can get the proper average as long as I don't add the mgr_id, then the groups break and its a mess............................
This is for a class so any help would be appreciated. As part of the solution, what I want to do is to understand the order of the joins and how that makes a difference in the outcome.