How to collect aggregated statistics in a Ruby on Rails application?

  It is important to collect aggregated statistics so that management can analyze the data and make well-informed decisions.  Sphere was retained by a client in the recruiting industry who, among other things, needed to collect the following data: Total shifts posted Total hours posted Total shifts worked Total hours worked Average length of shifts