Generation

text to sql syntaxWed, 08 Feb 2023

create a query to show the average salary of employees grouped by department and order the result by the average salary in descending order

SELECT department, avg(salary) from employees GROUP BY department ORDER BY avg(salary) DESC;

Want to kickstart your project?Use the new AI Studio to create your code