title: Grouping total active users for each of the previous 8 weeks
body: <p>I need to generate a report as follow:</p>
  
  <pre><code>week-ending date    |   number of active users
  8/6/2011                78
  8/13/2011               98
  8/20/2011               79
  </code></pre>
  
  <p>I have a users table called with these fields</p>
  
  <ul>
  <li>user_id</li>
  <li>hired_date   </li>
  <li>termination_date</li>
  <li>is_active</li>
  </ul>
  
  <p>I also have a date table with the previous 8 weeks which I plan on joining..</p>
  
  <ul>
  <li>week_start</li>
  <li>week_end</li>
  <li>week_num</li>
  </ul>
  
  <p>I'm stuck in how I can get the active users. How would I group them because I attempted something with datepart and it gave the number of new users within the week (ex. 4 users hired in week7), which isn't what I need. I could use some guidance here. Thanks in advance.</p>
  
  <p>SQL Server 2008</p>