Suppose we have a collection called employees that contains documents with the following fields:
employee_id, first_name, last_name, department and salary.
We want to find the average salary for employees in each department and sort the result in a descending order.