ผ่านไปกี่วันแล้วนับตั้งแต่ผู้ป่วย 005-87465 ได้รับฟอสอัลคาไลน์ครั้งล่าสุด การทดสอบในห้องปฏิบัติการในการมาโรงพยาบาลครั้งนี้หรือไม่ไม่จำเป็นต้องใช้โต๊ะทั้งหมด
how many days it has been since patient 005-87465 last received a alkaline phos. lab test on this hospital visit?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 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', lab.labresulttime)) FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-87465' AND patient.hospitaldischargetime IS NULL)) AND lab.labname = 'alkaline phos.' ORDER BY lab.labresulttime DESC LIMIT 1