Skip to main content

Practice · 1 of 3

Top Customers by Revenue

CHALLENGE
Difficulty: intermediate+25 XP

Given order lines (customer, amount, day), return the top N customers by total revenue, formatted "Name: total" (ties broken by name ascending). ``csharp public record OrderLine(string Customer, decimal Amount, int Day); static List<string> TopCustomers(IEnumerable<OrderLine> lines, int n); ``

Back to lesson: Practice: LINQ Practice: Sales Analytics