Different Approach
Why I got different answern when I used dept_emp table instead of dept_manager while calculating average salary for department
1 answers ( 0 marked as helpful)
Hi Deepak!
Thanks for reaching out.
The reason you may get different results when using the dept_emp table instead of the dept_manager table to calculate the average salary for departments is because these tables contain different sets of employees.
The dept_emp table likely contains information for all employees who are currently or have been assigned to departments, including regular employees who are not managers and managers. On the other hand, the dept_manager table specifically contains information for employees who are managers of departments.
Hope this helps.
Best,
Tsvetelin