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);
``
Press Submit to check your solution.
Back to lesson: Practice: LINQ Practice: Sales Analytics