使用groupdate gem:ActionView::Template::Error (PG::GroupingError: ERROR: column "warehouse_campaigns.id" must appear in the GROUP BY clause or be used in an aggregate function@campaigns = WarehouseCampaign.group_by_day_of_week(:dat
Oracle风格的SQL中典型的分组/汇总结果往往是这样的:- ---------- ---------- C 499 19616.8 C 87849651.6
....with被合计或小计的列(在本例中为C)显式地位于合计/小计行中。现在,我可以很容易地填充这个空值,通过在case语句中放入一个<em