score:4

Try the following

``````var list = originalList
.GroupBy(x => x.Number)
.Select(x => x.OrderBy(y => y.Percentage).First())
.ToList();
``````

This query will first group the items by the `Number` value. It will then order each group by the percentage and select out the first element (which is the lowest).

score:1

``````  var query = (from l in lst
group l by l.Number into g
select g.Min(x => x.Percentage)).ToList();
``````

score:1

Changing this up based on the interpretation that by "LINQ" the poster desires query-comprehension syntax instead of dot-syntax (otherwise the other responses suffice):

``````var query =
from i in list
group i by i.Number into gj
select gj.OrderBy(x => x.Percentage).First();
``````

But this still uses a lot of dot-syntax for the ordering. Which would be the functional equivalent of:

``````var query =
from i in list
group i by i.Number into gj
select
(from i in gj
orderby i.Percentage
select i).First();
``````

If you don't like the `.First()` call on the end, that's going to be a challenge that either will not have a solution within the LINQ language transforms or the solution you end up with will not be the clean solution that IMHO dot syntax provides for this problem. Query comprehensions can often make things simpler, but in this case I prefer the dot-syntax:

``````var query =
list.GroupBy(i => i.Number)
.Select(gj => gj.OrderBy(i => i.Percentage).First());
``````

The `gj.OrderBy(...).First()` portion accomplishes a More-LINQ-style MinBy operation (See Jon Skeet's post)

score:3

Would this work?

``````collection.GroupBy(item => item.Number).Select(group => group.Min())
``````

score:4

``````var query = from x in list
group x by x.Number into x
select x.OrderBy(y => y.Percentage).First();
``````