1. Write an SQL query to fetch the no. of workers for each department in the descending order.
Answers
Answered by
1
Answer:
SQL COUNT(*) with ORDER BY clause example
You can use the COUNT(*) function in the ORDER BY clause to sort the number of rows per group. For example, the following statement gets the number of employees for each department and sorts the result set based on the number of employees in descending order.
Similar questions