TASK #195 · MediumThe dashboard overstates department headcount
Your brief
For three days the dashboard has overstated department headcount. The report
has the right number of departments and the order totals are correct: only the
headcount is off, and the more orders a department has, the worse it gets.
Output name (department name), employees_count (number of employees) and total_amount (their order total).
Output name (department name), employees_count (number of employees) and total_amount (their order total).
Ctrl / ⌘ + ↵
Result
Write a query and run it to see the results.
Schema
departmentsid, nameemployeesid, name, department_id, manager_id, salary, hired_atcustomersid, name, registered_atordersid, customer_id, employee_id, amount, created_atloginsuser_id, logged_at