คำนวณจำนวนเอาต์พุตของ jackson pratt #1 สำหรับผู้ป่วย 1902 ในวันที่ 30/12/ปีนี้ ไม่จำเป็นต้องใช้ตารางทั้งหมด
calculate the total amount of jackson pratt #1 output for patient 1902 on 12/30/this year.It is not neccessary to use all the tables.
 d_icd_procedures:  row_id [ number]  icd9_code [ text]  short_title [ text]  long_title [ text] 
SELECT SUM(outputevents.value) FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 1902)) AND outputevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'jackson pratt #1' AND d_items.linksto = 'outputevents') AND DATETIME(outputevents.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') AND STRFTIME('%m-%d', outputevents.charttime) = '12-30'