title: select to group date and time in 5-minute intervals
body: <p>I wish count the rows of a table grouped by date and time intervals of 5 minutes:</p>
  
  <p>for example, if the minutes portion of HH:MM falls between 00 mins and 04 min it will be counted as 00, eg. 08:04 will be counted as 08:00</p>
  
  <p>if the minutes portion falls between 05 mins and 09 mins it will be counted as 05, eg. 08:06 will be counted as 08:05</p>
  
  <p><strong>Table Data</strong></p>
  
  <pre><code>Date       Time
  18/01/18    08:00
  18/01/18    08:01
  18/01/18    08:02
  18/01/18    08:03
  18/01/18    08:04
  
  18/01/18    08:05
  18/01/18    08:06
  18/01/18    08:08
  
  18/01/18    08:10
  
  19/01/18    17:01
  19/01/18    17:03
  19/01/18    17:04
  </code></pre>
  
  <p><strong>Expected Output</strong></p>
  
  <pre><code>DATE         TIME  COUNT
  18/01/2018   08:00   5
  18/01/2018   08:05   3
  18/01/2018   08:10   1
  19/01/2018   17:00   3
  </code></pre>
  
  <p><strong>Table Creation</strong></p>
  
  <p>create table TAB1 (tDATE DATE,tTIME VARCHAR2(5));</p>
  
  <p><strong>Data</strong></p>
  
  <pre><code>insert into TAB1(tDATE,tTIME) values (to_date('18/01/2018','DD/MM/YYYY'),'08:00');
  
  insert into TAB1(tDATE,tTIME) values (to_date('18/01/2018','DD/MM/YYYY'),'08:01');
  
  insert into TAB1(tDATE,tTIME) values (to_date('18/01/2018','DD/MM/YYYY'),'08:02');
  
  insert into TAB1(tDATE,tTIME) values (to_date('18/01/2018','DD/MM/YYYY'),'08:03');
  
  insert into TAB1(tDATE,tTIME) values (to_date('18/01/2018','DD/MM/YYYY'),'08:04');
  
  insert into TAB1(tDATE,tTIME) values (to_date('18/01/2018','DD/MM/YYYY'),'08:05');
  
  insert into TAB1(tDATE,tTIME) values (to_date('18/01/2018','DD/MM/YYYY'),'08:06');
  
  insert into TAB1(tDATE,tTIME) values (to_date('18/01/2018','DD/MM/YYYY'),'08:08');
  
  
  insert into TAB1(tDATE,tTIME) values (to_date('18/01/2018','DD/MM/YYYY'),'08:10');
  
  insert into TAB1(tDATE,tTIME) values (to_date('19/01/2018','DD/MM/YYYY'),'17:01');
  
  insert into TAB1(tDATE,tTIME) values (to_date('19/01/2018','DD/MM/YYYY'),'17:03');
  
  insert into TAB1(tDATE,tTIME) values (to_date('19/01/2018','DD/MM/YYYY'),'17:04');
  </code></pre>