Using CUST_ORDERS and CUSTOMERS, produce a report ranking the 2 highest-grossing products per country in 2015. Asked in the technical interview stage as SQL live coding.
Output
- One row per qualifying country and product, with columns
country, product_name, total_revenue, and revenue_rank.
- Include products with ranks 1 or 2. Products tied on revenue share a rank and should all be included.
- Ignore rows with a NULL country or NULL order amount. Sort by country, rank ascending, total revenue descending, and product name ascending.