ได้รับน้ำเกลือปกติรวม .9% ที่คนไข้ 31510 ได้รับเมื่อวันที่ 31/05/ปีนี้ ไม่จำเป็นต้องใช้ทุกโต๊ะ
get the total amount of .9% normal saline that patient 31510 has received on 05/31/this year.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 SUM(inputevents_cv.amount) 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 = 31510)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = '.9% normal saline' AND d_items.linksto = 'inputevents_cv') AND DATETIME(inputevents_cv.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') AND STRFTIME('%m-%d', inputevents_cv.charttime) = '05-31'