Olá, tudo bem... sou nova em ROR e estou precisando de ajuda com o
active query...
Bom.. tenho 3 models..
Staff, Appointment e Service..
Gostaria de saber quanto que esse staff gerou de serviço..
Obs.. O Staff possui 2 models filhos (Employees e Freelancer)
GOstaria de saber com faço isso.. fiz um sql, mas não sei como coloco
isso no código
SELECT count(S.value)
FROM Staff SF INNER JOIN Appointment A ON (SF.id = A.staff_id)
INNER JOIN Service S ON (A.service_id = S.id)
Alguém pode me ajudar??
--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment