human
Escriba una consulta que devuelva el salario promedio de los empleados en cada departamento.
gpt
SELECT d.name, AVG(e.salary) AS average_salary
FROM departments d LEFT JOIN employees e ON d.id = e.department_id 
GROUP BY d.name;