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_name
  • last_name
  • department
  • salary

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

1 Expert Approved Answer
Step: 1 Unlock

You can use the following SQL query to achieve this sql SELECT department AVGsa... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!