title: How to group by hour in HANA
body: <p>I have the following table in HANA :</p>
  
  <pre><code>vehicle_id    time                          roaming_time        parking_time
      1          Sep 01,2016 3:09:03 AM            3                   9
      2          Sep 01,2016 3:12:03 AM            6                   8
      1          Sep 01,2016 9:10:03 AM            10                  6
      4          Sep 01,2016 10:09:03 AM           9                   3
      1          Sep 01,2016 10:10:03 AM           10                  10
      4          Sep 01,2016 12:09:03 AM           3                   9
  </code></pre>
  
  <p>from these information I wanted to know that what is the sum of roaming time and sum of parking time for each hour from all the vehicles and want the output in the format:</p>
  
  <pre><code>time                         roaming_time     parking_time
  ____                         _____________    ____________
  2016-09-01 00:00:00                3                9
  2016-09-01 01:00:00                6                8
  2016-09-01 02:00:00                9                6
  2016-09-01 03:00:00                3                6
  2016-09-01 04:00:00                12               3
  2016-09-01 05:00:00                15               8
  2016-09-01 06:00:00                18               4
  2016-09-01 07:00:00                8                3
  2016-09-01 08:00:00                9                4
  2016-09-01 09:00:00                6                6
  2016-09-01 10:00:00                6                9
  ........
  2016-09-01 23:00:00                3                12
  </code></pre>
  
  <p>I need  to group the following query  which gives all the sum  by hour wise and get the expected result:</p>
  
  <pre><code>select sum(roaming_time) as roaming_time,sum(parking_time) as parking_time from time&gt;='2016-09-01 00:00:00'    time&gt;='2016-09-01 23:59:59'
  </code></pre>
  
  <p>I do not know how to do the grouping by hour in HANA. Any help is appreciated</p>