Headcount and average salary per department
AggregationEasy
For every department, including ones with no employees, return department, headcount and avg_salary (rounded to whole numbers; NULL when empty). Order by department.
Tables
departments: id, nameemployees: id, name, department_id, manager_id, salary, hired_on
Row order is checked. Column names do not have to match, but the number of columns and the values do.