 Write a query that returns the average salary of employees in each department. 

 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;
 اكتب استعلامًا يعيد متوسط رواتب الموظفين في كل قسم.

 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;