Last answered:

08 Mar 2024

Posted on:

22 Feb 2024


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)
Posted on:

08 Mar 2024


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.

Submit an answer