title: How to group timestamps in a 10 minute bucket and aggregate
body: <p>I have a table with a column "hit_timestamp" with time stamp datatype.
  below are some of the values.</p>
  
  <pre><code>20-MAR-17 00.00.00.000000000
  20-MAR-17 00.03.53.000000000
  20-MAR-17 00.01.16.000000000
  20-MAR-17 00.07.32.000000000
  20-MAR-17 00.18.36.000000000
  20-MAR-17 00.16.12.000000000 
  </code></pre>
  
  <p>I want to group then in 10 minutes buckets </p>
  
  <pre><code>time_bucket        no_of_records
  ----------          ---------
  "000000_000010"     4
  "000011_000020"     2
  </code></pre>