title: Query to group data by 5 second time intervals
body: <p>I have a table that has events that occur over a period of 1 hour. </p>
  
  <pre><code>2014-04-16 13:56:06.971 , 3474
  2014-04-16 13:56:07.061 , 3609
  2014-04-16 13:56:07.067 , 3617
  </code></pre>
  
  <p>The Table has the Time stamp and event ID</p>
  
  <p>I am trying to group the data to have a count of the number of events that occurred with 5 second intervals, so it looks like this:</p>
  
  <pre><code>0-5 sec., 3
  5-10 sec. , 6
  10-15 sec. , 4
  </code></pre>
  
  <p>Thanks in Advance!
  I am using SQL Server 2008</p>