Return
full_name — customer's nameemail — customer's emailmerchant_name — merchant's name (with highest total spend for this customer)total_spent — total transaction value at that merchant (for that customer)full_name ascending.Expected output
| full_name | merchant_name | total_spent | |
|---|---|---|---|
| Arjun Patel | arjun.patel@example.com | BestBuy | 6490 |
| Emma Wilson | emma.wilson@example.com | KL Duty Free | 780 |
| Liam Nguyen | liam.nguyen@example.com | BestBuy | 899 |
First 3 of 7 rows your query should return. Your column aliases don't need to match.