title: Convert simple SQL group-by into LINQ to SQL
body: <p>I'm having trouble. I can't understand existing answers to this on Stack Overflow and am too new to LINQ to SQL to be able to nut it out myself.</p>
  
  <p>See this SQL:</p>
  
  <pre><code>select p.Name as ProductName, SUM(o.NumberOf) as TotalOrdered from [Order] o
    join [Product] p on o.ProductId = p.Id
    group by p.Name
  </code></pre>
  
  <p>Returns a nice 2-column table with product names on the left and the total number that product which have been ordered (across all orders) in the right column. How can I duplicate this in LINQ to SQL?</p>
  
  <p>Here is what I've got so far:</p>
  
  <pre><code>var ctx = new DataClasses1DataContext();
  var totalProducts = (from o in ctx.Orders
                       join p in ctx.Products on o.ProductId equals p.Id
                       select new { p.Name, o.NumberOf })
      .GroupBy(t =&gt; t.Name)
      .Select(g =&gt; g.Key, ... );
  </code></pre>
  
  <p>What goes at the ... ?</p>