TASK #205 · MediumDepartment shares add up to 94%
Your brief
A presentation needs each department's share of the company headcount, as a
percentage with one decimal place.
In the report every share came out as a whole number, and together they add up to only 94%, although each department's headcount is correct.
Output name (department name) and headcount_share (the department's share of all company employees, in percent, rounded to 1 decimal place).
In the report every share came out as a whole number, and together they add up to only 94%, although each department's headcount is correct.
Output name (department name) and headcount_share (the department's share of all company employees, in percent, rounded to 1 decimal place).
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