Problem Description

Find the product category with the highest revenue. Revenue = SUM(qty * price) from OrderItems joined with Products.

Input Format

SQL query

Output Format

Result set

Sample Test Case

Input:
Orders, OrderItems, Products
Output:
One row category

Constraints

Use derived table and sort by revenue

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next