Report question

Question: Using group_by in rails/ruby