title: Mysql Group By 24 hour intervals
body: <p>How can I Group the records of the table Test by time interval, beginning everyday at 19:00 and ending on the next day at 18:59?</p>
  
  <p>Table: Test</p>
  
  <pre><code>id  creation_date   name
  1   2014-01-01      17:52:27    a
  2   2014-01-01      18:50:00    b
  3   2014-01-01      19:00:00    c
  4   2014-01-03      18:59:00    e
  5   2014-01-03      12:00:00    f
  </code></pre>
  
  <p>Desired result is:</p>
  
  <pre><code>Interval                                    Number of Occurrences
  2013-31-31 19:00:00 - 2014-01-01 18:59:59   2
  2014-01-01 19:00:00 - 2014-01-02 18:59:59   1
  2014-01-02 19:00:00 - 2014-01-03 18:59:59   1
  2014-01-03 19:00:00 - 2014-01-04 18:59:59   1
  </code></pre>