0
如何將以下sql查詢轉換爲Ruby on Rails?如何將SQL查詢轉換爲Ruby on Rails
select health_workers.name,health_workers.surname,clinics.name as clinic,count(observations.id) as count,observations.observation_date
from health_workers
left join observations on health_workers.id = observations.health_worker_id, clinics
where health_workers.clinic_id = clinics.id
group by health_workers.name,health_workers.surname,clinics.name,observations.observation_date.