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