จำนวนข้อมูลทั้งหมดที่ผู้ป่วย 027-144847 ได้รับในเดือน/30 ที่แล้วคือเท่าใด?ไม่จำเป็นต้องใช้ตารางทั้งหมด
what is the total amount of input patient 027-144847 has received on last month/30?It is not neccessary to use all the tables.
 treatment:  treatmentid [ number]  patientunitstayid [ number]  treatmentname [ text]  treatmenttime [ time] 
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-144847')) AND intakeoutput.cellpath LIKE '%intake%' AND DATETIME(intakeoutput.intakeoutputtime, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-1 month') AND STRFTIME('%d', intakeoutput.intakeoutputtime) = '30'