Revenue per employee per product group

Question

You're analyzing revenue for Company XYZ and want to understand what the revenue per employee was in 2017. You have the following tables:

Table: employees

Column Name Data Type Description
employeeid integer id of the employee
product_area string product area that employee works in
compensation integer yearly salary for employee

Table: revenue

Column Name Data Type Description
date string format is "YYYY-MM-DD
product_area string product area that employee works in
revenue integer revenue made on the given date in USD

Given the above, write a SQL query to calculate revenue per employee by product area.

Solution

Access restricted

Subscribe to premium account to see the solution.

Get premium now