Matt:
> If you just want data rolled up for *one* Utility (I'm
> guessing that's what `u` in the code above is...)
> you could skip the group:
>
> sum = u.utility_data.sum(:ami_residential)
You are spot on: in this case I'm just considering one Utility at a
time. I don't know what possessed me to include the GROUP clause since
the WHERE clause alone is sufficient. Time to go back to SQL camp...
Many thanks.
- ff
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/35f183fb85fb45b7d7c3e1e8aad03da3%40ruby-forum.com.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment