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
| id | INT |
| name | TEXT |
▸transactions
| id | INT |
| customer_id | INT |
| amount | NUMERIC(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.