<prompt> Write a query that returns the average salary of employees in each department.  <response>: Assuming that the data is stored in a relational database with a table named employees that has columns department and salary, the query would look something like this:SELECT department, AVGsalaryFROM employeesGROUP BY departmentThis query selects the department and average salary columns from the employees table. The AVG function calculates the average salary for each group of rows defined by the GROUP BY clause. In this case, the groups are defined by the department column, so the query calculates the average salary for each department. 