Hi, I'm a newbie, i'm trying to do something I think should be trival
but havring great difficulty so any help appreciated.

sum(amounts) group by director, risk

output to be director, risk, amounts

i've tried find with :select

and almost got it right with sum

using
    sum(:amount, :group => 'director, risk', :order => 'director,
risk',
           :conditions => ['company_id = ?'])

but this does not output the director only [[10,50], [20,50],
[10,50].....

Any help appreciated
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to