views:

17

answers:

0

I want to group my data by the hour/day possibly even to the quarter hour.

Can I do this directly in ActiveRecord or should I just grab all the data and do the aggregation manually?

Table "Checkin":
  Time    NumBikes ChangeBikes
  09:00   5         5
  09:05   6         1
  09:10   10        4
  10:00   6         4
  10:05   8         2
  10:10   16        8

Looking to get something like:
  Time   Sum(ChangeBikes) 
  09:00   10
  10:00   14

Thanks in advance, Chris.