ผู้ป่วย 022-142620 ได้รับยาจนถึงวันที่ 08/2105 หรือไม่?ไม่จำเป็นต้องใช้ตารางทั้งหมด
has patient 022-142620 received any medication until 08/2105?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(*) > 0 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '022-142620')) AND STRFTIME('%y-%m', medication.drugstarttime) <= '2105-08'