title: Showing all rows with SQL Pivot including those with record counts of zero
body: <p>Is there a way using Pivot to include rows for which no records exist and show 0s or nulls for the results?</p>
  
  <p>I want the reults of the query to look something like this :-</p>
  
  <pre><code>     A    B   C    D
  5   12   81   107  0
  4   0     0    0   0 
  3   1    12   12   5 
  2   3    0     0   0 
  1   0    0     0   0
  </code></pre>
  
  <p>However, currently Pivot is not returning empty rows and my results look like this :-</p>
  
  <pre><code>     A    B   C    D
  5   12   81   107  0
  3   1    12   12   5 
  2   3    0     0   0 
  </code></pre>
  
  <p>Any way that this can be achieved with by doing a sort of 'left outer join' on the Pivot to show all rows?</p>