ชื่อของผู้ป่วยยา 32755 ได้รับใบสั่งยาภายใน 2 วัน หลังจากได้รับการวินิจฉัยว่ามีค่าดัชนีมวลกาย 33.0-33.9 ผู้ใหญ่ในการมาโรงพยาบาลครั้งสุดท้าย? ไม่จำเป็นที่จะต้องใช้โต๊ะทั้งหมด
what was the name of the drug patient 32755 got prescription for within 2 days after being diagnosed with bmi 33.0-33.9,adult in the last hospital visit?It is not neccessary to use all the tables.
 inputevents_cv:  row_id [ number]  subject_id [ number]  hadm_id [ number]  icustay_id [ number]  charttime [ time]  itemid [ number]  amount [ number] 
SELECT t2.drug FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE admissions.subject_id = 32755 AND diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'bmi 33.0-33.9,adult') AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1) AS t1 JOIN (SELECT admissions.subject_id, prescriptions.drug, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE admissions.subject_id = 32755 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1) AS t2 ON t1.subject_id = t2.subject_id WHERE t1.charttime < t2.startdate AND DATETIME(t2.startdate) BETWEEN DATETIME(t1.charttime) AND DATETIME(t1.charttime, '+2 day')