title: SQL Group Distinct Count
body: <p>I have the following table  </p>
  
  <pre><code>User ID    Start Date   End Date
  -------------------------------------
  John Doe   Mar 11 2011  May 28 2011
  Robret S   Mar 21 2011  Jun 29 2011
  Tina T     Feb 01 2011  August 20 2011
  </code></pre>
  
  <p>I want to show how many people I have available for the past 6 months, even if the month has no people. How can this be possible.  I know I have to do grouping and use distinct count.</p>
  
  <p>Expected Output: </p>
  
  <pre><code>February  = 1 Resource
  March     = 3 Resources
  April     = 3 Resources
  May       = 3 Resources
  June      = 2 Resources
  July      = 1 Resource
  August    = 1 Resource
  </code></pre>