I finally got the spam notification email today. Here are parts of the
posts you added:
---
Post 1:
I'm looking to perform an average calculation from the sums of two
columns. I can't seem to find a way to alias the output then view that
calculation:
This works, but there has to be a better way:
---
Post 2:
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:
---
You probably want:
dataset.select{(sum(:breading)/sum(:multiple)).as(:average)}
That returns a dataset. If you just want the value:
dataset.get{(sum(:breading)/sum(:multiple)).as(:average)}
There may be context I'm missing by not seeing the full post. If that
doesn't answer your question, please reply.
Thanks,
Jeremy
--
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/d1946871-ea11-4ccd-bb8d-bb0e3d2bc641%40googlegroups.com.