คำนวณจำนวนยาที่ผู้ป่วย 002-75209 สั่งจ่ายในปี 10/ปีที่แล้ว ไม่จำเป็นต้องใช้ตารางทั้งหมด
calculate the number of medications that patient 002-75209 has been prescribed in 10/last year.It is not neccessary to use all the tables.
 vitalperiodic:  vitalperiodicid [ number]  patientunitstayid [ number]  temperature [ number]  sao2 [ number]  heartrate [ number]  respiration [ number]  systemicsystolic [ number]  systemicdiastolic [ number]  systemicmean [ number]  observationtime [ time] 
SELECT COUNT(*) FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002-75209')) AND DATETIME(medication.drugstarttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') AND STRFTIME('%m', medication.drugstarttime) = '10'