ActiveRecord How-To: Multiple Aggregate Counts Grouped by Day

How to aggregate and group multiple columns within a single table for metric views.