คำนวณความแตกต่างระหว่างจำนวนอินพุตและเอาท์พุตทั้งหมดของผู้ป่วย 9566 ในการเยี่ยมห้องผู้ป่วยหนักในปัจจุบัน ไม่จำเป็นต้องใช้ตารางทั้งหมด
calculate the difference between patient 9566's total amount of input and output on the current intensive care unit visit.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 (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 = 9566) AND icustays.outtime IS NULL)) - (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 = 9566) AND icustays.outtime IS NULL))