ผู้ป่วย 26612 ได้รับการทดสอบช่องว่างประจุลบจนถึงปี 2104 หรือไม่ ไม่จำเป็นต้องใช้ตารางทั้งหมด
has patient 26612 received until 2104 a test for anion gap?It is not neccessary to use all the tables.
 transfers:  row_id [ number]  subject_id [ number]  hadm_id [ number]  icustay_id [ number]  eventtype [ text]  careunit [ text]  wardid [ number]  intime [ time]  outtime [ time] 
SELECT COUNT(*) > 0 FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'anion gap') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 26612) AND STRFTIME('%y', labevents.charttime) <= '2104'