Hey,
That worked. Thanks for the quick reply :)

Regards,
Elroy

On May 15, 5:15 pm, "[email protected]" <[email protected]>
wrote:
> Task.group("complete_dt").sum("effort")
>
> On May 15, 4:11 pm, enygmatic <[email protected]> wrote:
>
>
>
>
>
>
>
> > Hi,
> > I have two table with the following structure
>
> > ================
> > Projects Table
> > ================
> > id| Name | Description
> > ================
> > ==============================
> > Tasks Table
> > ==============================
> > id|project_id|task_name|complete_dt|effort
> > ==============================
> > table and task are related by a one-to-many association
>
> > Is there any way to query Tasks using active record and get effort put
> > in on each day?
>
> > Doing this via SQL is trivial, but for the life of me haven't been
> > able to figure out how to do this using the Model
>
> > Any ideas ?

-- 
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