Problem Description

Assume Payments.amount is negative for refunds. Find customers where total refund is more than 30% of total paid amount. Use conditional SUM.

Input Format

SQL query

Output Format

Result set

Sample Test Case

Input:
Payments(order_id, amount), Orders(order_id, customer_id)
Output:
Customer list

Constraints

Think: SUM refund and SUM paid separately

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next