Problem Description

From OrderItems(order_id, product_id), count how often two products are bought in the same order. Return top 10 pairs by count.

Input Format

SQL query

Output Format

Result set

Sample Test Case

Input:
OrderItems(order_id, product_id)
Output:
Top 10 pairs

Constraints

Think: self join on order_id and keep product_a < product_b

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next