ครั้งแรกจนกระทั่ง 51 เดือนที่แล้ว ผู้ป่วย 021-49171 กำหนดให้ยา warfarin sod และ acetaminophen 500 mg po tab พร้อมกันเมื่อใด?ไม่จำเป็นต้องใช้ทุกตาราง
for the first time until 51 months ago, when was patient 021-49171 prescribed warfarin sod and acetaminophen 500 mg po tabs at the same time?It is not neccessary to use all the tables.
 diagnosis:  diagnosisid [ number]  patientunitstayid [ number]  diagnosisname [ text]  diagnosistime [ time]  icd9code [ text] 
SELECT t1.drugstarttime FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'warfarin sod' AND patient.uniquepid = '021-49171' AND DATETIME(medication.drugstarttime) <= DATETIME(CURRENT_TIME(), '-51 month')) AS t1 JOIN (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'acetaminophen 500 mg po tabs' AND patient.uniquepid = '021-49171' AND DATETIME(medication.drugstarttime) <= DATETIME(CURRENT_TIME(), '-51 month')) AS t2 ON t1.uniquepid = t2.uniquepid WHERE DATETIME(t1.drugstarttime) = DATETIME(t2.drugstarttime) ORDER BY t1.drugstarttime LIMIT 1