Problem Description

Return top 3 orders by total_amount for each customer.

Input Format

SQL query

Output Format

Result set

Sample Test Case

Input:
Orders(customer_id, total_amount)
Output:
Up to 3 per customer

Constraints

Use ROW_NUMBER window

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next