title: How to select where there are 2 consecutives rows with a specific value using MySQL?
body: <p>I'm building a system that should show when the students missed two days in a row.
  For example, this table contains the absences.</p>
  
  <pre><code>day         |   id  |   missed
  ----------------------------------
  2016-10-6   |   1   |   true
  2016-10-6   |   2   |   true
  2016-10-6   |   3   |   false
  
  2016-10-7   |   1   |   true
  2016-10-7   |   2   |   false
  2016-10-7   |   3   |   true
  
  2016-10-10  |   1   |   false
  2016-10-10  |   2   |   true
  2016-10-10  |   3   |   true
  </code></pre>
  
  <blockquote>
    <p>(days 2016-10-8 and 2016-10-9 are weekend)</p>
  </blockquote>
  
  <p>in the case above:</p>
  
  <ul>
  <li>student 1 missed the days 1st and 2nd. (consecutive)</li>
  <li>student 2 missed the days 1st and 3rd. (nonconsecutive) </li>
  <li>student 3 missed the days 2nd and 3rd. (consecutive) </li>
  </ul>
  
  <p>The query should select only student 1 and 3.</p>
  
  <p>Is possible to do stuff like this just with a single SQL Query?</p>