title: How do I group records having time difference of more than an hour?
body: <p>I'm new to this site but bear with me. </p>
  
  <p>I'm trying to <code>GROUP BY</code> some data using SQL Server. </p>
  
  <p>Here's the data:</p>
  
  <pre><code>Computer    VisitDate
  ComputerA   2012-04-28 09:00:00
  ComputerA   2012-04-28 09:05:00
  ComputerA   2012-04-28 09:10:00
  ComputerB   2012-04-28 09:30:00
  ComputerB   2012-04-28 09:32:00
  ComputerB   2012-04-28 09:44:00
  ComputerB   2012-04-28 09:56:00
  ComputerB   2012-04-28 10:25:00
  ComputerA   2012-04-28 12:25:00
  ComputerC   2012-04-28 12:30:00
  ComputerC   2012-04-28 12:35:00
  ComputerC   2012-04-28 12:45:00
  ComputerC   2012-04-28 12:55:00
  </code></pre>
  
  <p>What I'm trying to achieve is to group the data by Computer but also group if a Computer has a difference between a visit time longer than 1 hour. Here is the result of what I'm trying to do:</p>
  
  <pre><code>Computer     VisitDate
  ComputerA    2012-04-28 09:00:00
  ComputerB    2012-04-28 09:30:00
  ComputerA    2012-04-28 12:25:00
  ComputerC    2012-04-28 12:30:00
  </code></pre>
  
  <p>So <code>Computer A</code> is shown twice because it visited at 09:10:00 and then visited again at 12:25:00 which means a difference of over 1 hour.</p>
  
  <p>It's easy to 'GROUP BY Computer' but the other, I wouldn't know where to start. Any help on this problem would be much appreciated.</p>