บอกฉันถึงความแตกต่างระหว่างจำนวนอินพุตและเอาท์พุตทั้งหมดจากผู้ป่วย 027-203413 ในวันนี้หรือไม่ ไม่จำเป็นต้องใช้ตารางทั้งหมด
tell me the difference between the total amount of input and output from patient 027-203413 today?It is not neccessary to use all the tables.
 medication:  medicationid [ number]  patientunitstayid [ number]  drugname [ text]  dosage [ text]  routeadmin [ text]  drugstarttime [ time]  drugstoptime [ time] 
SELECT (SELECT SUM(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-203413')) AND intakeoutput.cellpath LIKE '%intake%' AND DATETIME(intakeoutput.intakeoutputtime, 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-0 day')) - (SELECT SUM(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-203413')) AND intakeoutput.cellpath LIKE '%output%' AND DATETIME(intakeoutput.intakeoutputtime, 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-0 day'))