what is the average value of ph in patient 10266's body in the last hospital visit?
select avg(labevents.valuenum) from labevents where labevents.hadm_id in ( select admissions.hadm_id from admissions where admissions.subject_id = 10266 and admissions.dischtime is not null order by admissions.admittime desc limit 1 ) and labevents.itemid in ( select d_labitems.itemid from d_labitems where d_labitems.label = 'ph' )