Question: Sure! Here's a MySQL query question for you: Consider a table named employees with the following columns: employee_id (Primary Key) first_name last_name department salary Write
Sure! Here's a MySQL query question for you:
Consider a table named employees with the following columns:
employee_id(Primary Key)first_namelast_namedepartmentsalary
Write a SQL query to find the average salary for each department, along with the total number of employees in each department. Sort the result by the average salary in descending order.
Step by Step Solution
There are 3 Steps involved in it
You can use the following SQL query to achieve this sql SELECT department AVGsa... View full answer
Get step-by-step solutions from verified subject matter experts
