mahir_data
mediumMaybank · joinsPro

Total spend per customer

Maybank wants each customer's total card spend.

Join customers to transactions and return each customer's name and their total transaction amount as total_spent. Only include customers who have at least one transaction.

Schema

customers
idINT
nameTEXT
transactions
idINT
customer_idINT
amountNUMERIC(10,2)

Pro

The example input, expected output, and walkthrough for this question unlock with a Pro plan.

Pro

This is a Pro question

Premium practice questions unlock with a Pro plan. The full solution, expected output, and grading are available to Pro members.

See Pro plans