title: SQL/Teradata: Return records where value in consecutive rows is the same
body: <p>I have a data set that looks like:</p>
  
  <pre><code>ID        date     emp_num    loc
  1111     5/2/16    111111     Brooklyn
  1112     5/3/16    222222     Detroit
  1113     5/3/16    333333     San Diego
  1114     5/2/16    333333     Orlando
  1115     5/5/16    333333     Brooklyn
  1116     5/7/16    111111     Orlando
  </code></pre>
  
  <p>In this case, I would want to return records 1113, 1114, and 1115 because the emp_num in consecutive rows (ordered by ID) is the same.</p>
  
  <p>I use Teradata, but if anyone has a SQL solution for another engine I can usually manage to translate it.</p>
  
  <p>Thank you.</p>