jeniferfleurant icon

pregnancy by month

jeniferfleurant | PRO | 09/07/18 06:45:03 PM UTC | 0 ⭐ | 330 👁️ | Never ⏰ | []
MySQL |

340 B

|

None

|

0 👍

/

0 👎

select left(patient_code,8) as hospital, count(id_patient_mother) as nbr, concat(month(dpa),'-',year(dpa)) as month_year_dpa
from tracking_pregnancy 
left join patient on patient.id=id_patient_mother
where dpa between '2017-08-01' and '2018-08-31'
GROUP BY concat(month(dpa),'-',year(dpa)), left(patient_code,8)
order by year(dpa),month(dpa)

Comments