ผู้ป่วยปี 20165 เข้ารับการรักษาครั้งแรกจนถึงปี 2100 เมื่อใด? ไม่จำเป็นต้องใช้ตารางทั้งหมด
when did patient 20165 first undergo the procedure until 2100?It is not neccessary to use all the tables.
 admissions:  row_id [ number]  subject_id [ number]  hadm_id [ number]  admittime [ time]  dischtime [ time]  admission_type [ text]  admission_location [ text]  discharge_location [ text]  insurance [ text]  language [ text]  marital_status [ text]  ethnicity [ text]  age [ number] 
SELECT procedures_icd.charttime FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 20165) AND STRFTIME('%y', procedures_icd.charttime) <= '2100' ORDER BY procedures_icd.charttime LIMIT 1