[Rails] Re: calculating running averages

2011-05-30 Thread Stefano
If you want to have a 'quick' solution to the average problem why not do it like this: a table like: id | number_of_days | total_cars At the end of every day you add +1 to the number of days column and add the number of cars for that day. So as an example after two weeks it would look like this:

Re: [Rails] Re: calculating running averages

2011-05-30 Thread Matt Harrison
On Mon, May 30, 2011 at 01:39:26AM -0700, Stefano wrote: If you want to have a 'quick' solution to the average problem why not do it like this: a table like: id | number_of_days | total_cars At the end of every day you add +1 to the number of days column and add the number of cars for