1. 2. var query = 3. (from item in OrderedItem 4. group item.Qty by item.Product into g 5. orderby g.Sum() descending 6. select g.Key).Take(5); // get the top 5 orders 7.