Which SQL statement will determine the average salary of emp
Which SQL statement will determine the average salary of employees in each
department.
Note that the SALARY column can have NULL values, and the NULLs should not be included
when the average is calculated.
Solution
Select
E.department as Deparment
,AVG(salary) as Average_Department_Salary
from
Employees E
Group by E.department
AVG() function automatically ignores NULL values
