title: Using GroupBy and Max in LINQ Lambda Expressions
body: <p>I have a collection, for example:</p>
  
  <pre><code>**id1, id2, value**
     1    9    12
     2    9     6
     3    11    8
     4    11   87
  </code></pre>
  
  <p>I want to use LINQ and get the following result:</p>
  
  <pre><code>**value**
     6
     87
  </code></pre>
  
  <p>P.S.</p>
  
  <pre><code>id1 - select MAX;
  id2 - group column;
  </code></pre>
  
  <p>I need an answer in the form of</p>
  
  <pre><code>var result = list.GroupBy(x=&gt;x.id2).select(s=&gt;s.value);
  </code></pre>
  
  <p>I hope for your help.</p>