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;

Questions about programming?Chat with your personal AI assistant