I'm trying to perform a calculation on the sums of two columns and assign 
an alias to that calculation:

puts C.select{sum(:breading)/sum(:multiple)}.as(:average)

I got this to work, but I think there's a better way:

#{ C.select{sum(:breading)/sum(:multiple)}.first.values.first.to_f }

Can this be done?  I was expecting the result to be a hash but it doesn't 
seem to answer.  Nor does .first nor .all.

Cheers

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sequel-talk/e4796ee4-f93c-4fd2-837b-5e1eeec6bd3b%40googlegroups.com.

Reply via email to