title: Linq to SQL - a query to get a count() even when 0
body: <p>I have this query:</p>
  
  <pre><code>(from a in SickDays
      join b in Class.Where(p =&gt; p.ID == myId) on a.Class_ID equals b.ID
      join c in Student on a.Student_ID equals c.ID
      group a by new { c.Name, c.Order } into ac
      select new { Count = ac.Count(), Name = ac.Key.Name, Order = ac.Key.Order }
  ).OrderBy(f =&gt; f.Order)
  </code></pre>
  
  <p>This returns:</p>
  
  <pre><code>Count | Name | Order
      3 | Dave |     a
      2 | John |     b
      7 | Sally|     c
  </code></pre>
  
  <p>However I'd like it to return this:</p>
  
  <pre><code>Count | Name | Order
      3 | Dave |     a
      2 | John |     b
      7 | Sally|     c
      0 | Mark |     d
      0 | Betty|     e
  </code></pre>
  
  <p><strong>UPDATE:</strong>
  This is what Students, Classes and SickDays look like using @sixlettervariables example:</p>
  
  <pre><code>var Students = new List&lt;Student&gt;()
  {
      new Student { Id = 1, Name = "Al", Order = 'a' },
      new Student { Id = 2, Name = "Betty", Order = 'b' },
      new Student { Id = 3, Name = "Charles", Order = 'c' },
  };
  
  var Classes = new List&lt;Class&gt;()
  {
      new Class { Id = 1, Title = "A100" },
      new Class { Id = 2, Title = "A200" },
  };
  
  var SickDays = new List&lt;SickDay&gt;()
  {
      new SickDay { Id = 1, StudentId = 1, ClassId = 1 },
      new SickDay { Id = 2, StudentId = 1, ClassId = 1 },
      new SickDay { Id = 3, StudentId = 1, ClassId = 2 },
      new SickDay { Id = 4, StudentId = 1, ClassId = 2 },
      new SickDay { Id = 5, StudentId = 2, ClassId = 1 },
  };
  </code></pre>
  
  <p>Ok the above is now correct, so sorry for the confusion!</p>