Report question

Question: Rails 3.1 with PostgreSQL: GROUP BY must be used in an aggregate function