title: Group by statement to do average of time
body: <p>My existing database has data coming for an id, value and time. There is one record coming every 3 seconds. I want my <code>select</code> statement to use these data and group them based on id and hrly basis to show the average of the values in that hr. How can I use <code>group by</code> to achieve this ?</p>
  
  <p>This is my sample data:</p>
  
  <pre><code>id  value   date       time
  a   5       5/18/2015  10:27:22
  a   9       5/18/2015  10:27:25
  b   7       5/18/2015  10:27:22
  b   8       5/18/2015  10:27:22
  </code></pre>
  
  <p>I have data coming in every 3 seconds. I want it to be aggregated based on every hr of the day to reflect avg values of that id in that hr.
  I want the output to look like</p>
  
  <pre><code>id -a , gives avg of 7 , at 10 on 5/18/2015
  </code></pre>