มีผู้ป่วยกี่รายที่ได้รับยา cefazolin 2gm syr ภายใน 2 เดือนหลังจากได้รับการวินิจฉัยว่าเป็นโรคเบาหวานจนถึงปี 2104?ไม่จำเป็นต้องใช้ตารางทั้งหมด
how many patients were prescribed the drug cefazolin 2gm syr within 2 months after having been diagnosed with diabetes mellitus until 2104?It is not neccessary to use all the tables.
 medication:  medicationid [ number]  patientunitstayid [ number]  drugname [ text]  dosage [ text]  routeadmin [ text]  drugstarttime [ time]  drugstoptime [ time] 
SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'diabetes mellitus' AND STRFTIME('%y', diagnosis.diagnosistime) <= '2104') AS t1 JOIN (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'cefazolin 2gm syr' AND STRFTIME('%y', medication.drugstarttime) <= '2104') AS t2 WHERE t1.diagnosistime < t2.drugstarttime AND DATETIME(t2.drugstarttime) BETWEEN DATETIME(t1.diagnosistime) AND DATETIME(t1.diagnosistime, '+2 month')