คำนวณความแตกต่างระหว่างอินพุตรวมของผู้ป่วย 28048 และเอาต์พุตทั้งหมดจนถึง 30/01/2104 ไม่จำเป็นต้องใช้ตารางทั้งหมด
calculate the difference between patient 28048's total input and the total output until 01/30/2104.It is not neccessary to use all the tables.
 outputevents:  row_id [ number]  subject_id [ number]  hadm_id [ number]  icustay_id [ number]  charttime [ time]  itemid [ number]  value [ number] 
SELECT (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 = 28048)) AND STRFTIME('%y-%m-%d', inputevents_cv.charttime) <= '2104-01-30') - (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 = 28048)) AND STRFTIME('%y-%m-%d', outputevents.charttime) <= '2104-01-30')