hmm.. what was patient 49295's last ph until 6 months ago?
select labevents.valuenum from labevents where labevents.hadm_id in ( select admissions.hadm_id from admissions where admissions.subject_id = 49295 ) and labevents.itemid in ( select d_labitems.itemid from d_labitems where d_labitems.label = 'ph' ) and datetime(labevents.charttime) <= datetime(current_time,'-6 month') order by labevents.charttime desc limit 1