when did patient 5887 last get a prescription for d10w during the last month?
select prescriptions.startdate from prescriptions where prescriptions.hadm_id in ( select admissions.hadm_id from admissions where admissions.subject_id = 5887 ) and prescriptions.drug = 'd10w' and datetime(prescriptions.startdate,'start of month') = datetime(current_time,'start of month','-1 month') order by prescriptions.startdate desc limit 1