ผู้ป่วย 9833 ผ่านการทดสอบฟอสเฟตจนถึง 73 เดือนที่แล้วหรือไม่ ไม่จำเป็นต้องใช้ตารางทั้งหมด
had patient 9833 undergone a phosphate test until 73 months ago?It is not neccessary to use all the tables.
 labevents:  row_id [ number]  subject_id [ number]  hadm_id [ number]  itemid [ number]  charttime [ time]  valuenum [ number]  valueuom [ text] 
SELECT COUNT(*) > 0 FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'phosphate') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 9833) AND DATETIME(labevents.charttime) <= DATETIME(CURRENT_TIME(), '-73 month')