title: How can I find duplicate consecutive values in this table?
body: <p>Say I have a table which I query like so:</p>
  <pre><code>select date, value from mytable order by date
  </code></pre>
  <p>and this gives me results:</p>
  <pre><code>date                  value
  02/26/2009 14:03:39   1                
  02/26/2009 14:10:52   2          (a)
  02/26/2009 14:27:49   2          (b)
  02/26/2009 14:34:33   3
  02/26/2009 14:48:29   2          (c)
  02/26/2009 14:55:17   3
  02/26/2009 14:59:28   4
  </code></pre>
  <p>I'm interested in the rows of this result set where the value is the same as the one in the previous or next row, like row b which has <code>value=2</code> the same as row (a).  I don't care about rows like row (c) which has <code>value=2</code> but does not come directly after a row with <code>value=2</code>.  How can I query the table to give me all rows like (a) and (b) only?  This is on Oracle, if it matters.</p>