Profit margins for all combinations of sales channels by org
Suppose you're looking to calculate the net profit margin for each combination of sales org and sales channel. You're given the following tables to work with:
|1||Direct from Manufacturer|
Using the above tables, write a SQL query to return the following:
- Net profit margin (sales_org_revenue - channel_cost) for all combinations of sales_org and channel (e.g. you'll need to JOIN on both sales_org_id and channel_id)
- For those combinations that have no revenue or cost data, you're still asked to return the rows, but you can mark revenue, cost, and profit all as 0
Click here to view/query the tables in an interactive SQL editor.
Subscribe to premium account to see the solution.Get premium now