Displaying 1 result from an estimated 1 matches for "column_alias_for".
2008 May 27
2
order complex aggregation results in 'calculate'
Hi,
How would you order the results of a complex aggregation using
''calculate'' (from ActiveRecord::Calculations::ClassMethod)?
I have a "legacy" table from which I would like to retrieve some
aggregated data, with an ordering. Something like:
Entry.calculate(''avg'', ''thevalue'', { :order=> ''avg_thevalue DESC'' })