การบริโภคครั้งสุดท้ายที่ผู้ป่วย 739 เมื่อวานนี้ได้รับชื่ออะไร? ไม่จำเป็นต้องใช้ตารางทั้งหมด
what was the name of the last intake that patient 739 yesterday had?It is not neccessary to use all the tables.
 labevents:  row_id [ number]  subject_id [ number]  hadm_id [ number]  itemid [ number]  charttime [ time]  valuenum [ number]  valueuom [ text] 
SELECT d_items.label FROM d_items WHERE d_items.itemid IN (SELECT inputevents_cv.itemid FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 739)) AND DATETIME(inputevents_cv.charttime, 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-1 day') ORDER BY inputevents_cv.charttime DESC LIMIT 1)