นับจำนวนครั้งที่ผู้ป่วย 004-7984 รับประทานยาเซฟาปิมเมื่อมาโรงพยาบาลครั้งล่าสุด ไม่จำเป็นที่จะต้องใช้โต๊ะทั้งหมด
count the number of times patient 004-7984 was taking cefepime when they came to the hospital last time.It is not neccessary to use all the tables.
 patient:  uniquepid [ text]  patienthealthsystemstayid [ number]  patientunitstayid [ number]  gender [ text]  age [ text]  ethnicity [ text]  hospitalid [ number]  wardid [ number]  admissionheight [ number]  admissionweight [ number]  dischargeweight [ number]  hospitaladmittime [ time]  hospitaladmitsource [ text]  unitadmittime [ time]  unitdischargetime [ time]  hospitaldischargetime [ time]  hospitaldischargestatus [ text] 
SELECT COUNT(*) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '004-7984' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime DESC LIMIT 1)) AND intakeoutput.cellpath LIKE '%intake%' AND intakeoutput.celllabel = 'cefepime'