title: Sum, Order, Group, and Top/Take in Linq
body: <p>I'm very new to LINQ, I've searched the boards but none of the other q/a's give a complete sample. I need to query with LINQ a strongly typed <code>IList&lt;&gt;</code> object and I must:</p>
  
  <ol>
  <li>Sum by a property</li>
  <li>Group by a property</li>
  <li>Order by the same property I did Sum on</li>
  <li>Limit the result to top 2</li>
  </ol>
  
  <p>For example if my data is like this:</p>
  
  <pre><code> Id  |  Customer  |  CartTotal
  -------------------------------
   1   |      a     |     100 
   2   |      a     |     50
   3   |      b     |     110
   4   |      b     |     128
   5   |      c     |     75
   6   |      c     |     30
  </code></pre>
  
  <p>My result needs to be like this where I've limited it top 2, grouped by customer, and done a sum on CartTotal:</p>
  
  <pre><code>Customer  |  CartTotal
  ----------------------
      b     |     238 
      a     |     150
  </code></pre>
  
  <p>What's the best way of accomplishing this?</p>