title: find records for user that are not contiguous
body: <p>I am having trouble figuring out how to even start this query.</p>
  
  <p>I have a table that has the following columns and data:</p>
  
  <pre><code>User   BeginMile EndMile
  1         1        5
  1         5        6
  1         6        20
  1         20       25
  1         25       29
  2         1         9
  2         15        20
  3         1         2
  3         6         10
  3         10        12
  </code></pre>
  
  <p>I need to first find where there are gaps for each user from the EndMile of the previous record, to the BeginMile of the next record. I then need to return the record before and after where the gap occurs for each user.</p>
  
  <p>In the previous data example, I would like the following returned:</p>
  
  <pre><code>User   PrevBeginMile   PrevEndMile    AfterBeginMile AfterEndMile   Gap
  2         1                9                15          20           6
  3         1                2                6           10           4
  </code></pre>
  
  <p>How can this be done?</p>