TASK #207 · HardTwo departments split the whole company revenue
Your brief
Management compares how much the Sales and Product departments
contribute to company revenue: they need each department's revenue and its
share of the whole company's revenue, in percent.
The two shares add up to exactly 100%, although employees of other departments close orders too.
Output name (department name), revenue (department revenue) and revenue_share (share of the whole company's revenue in percent, rounded to 1 decimal place).
The two shares add up to exactly 100%, although employees of other departments close orders too.
Output name (department name), revenue (department revenue) and revenue_share (share of the whole company's revenue 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