เมื่อผู้ป่วย 002-20631 ได้รับเกล็ดเลือดครั้งสุดท้ายเมื่อเดือนที่แล้ว/12?ไม่จำเป็นต้องใช้ทุกโต๊ะ
when patient 002-20631 got an intake of platelets for the last time on last month/12?It is not neccessary to use all the tables.
 cost:  costid [ number]  uniquepid [ text]  patienthealthsystemstayid [ number]  eventtype [ text]  eventid [ number]  chargetime [ time]  cost [ number] 
SELECT intakeoutput.intakeoutputtime FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002-20631')) AND intakeoutput.cellpath LIKE '%intake%' AND intakeoutput.celllabel = 'platelets' AND DATETIME(intakeoutput.intakeoutputtime, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-1 month') AND STRFTIME('%d', intakeoutput.intakeoutputtime) = '12' ORDER BY intakeoutput.intakeoutputtime DESC LIMIT 1