has patient 5310 been administered any d10w during the last month?
select count(*)>0 from inputevents_cv where inputevents_cv.icustay_id in ( select icustays.icustay_id from icustays where icustays.hadm_id in ( select admissions.hadm_id from admissions where admissions.subject_id = 5310 ) ) and inputevents_cv.itemid in ( select d_items.itemid from d_items where d_items.label = 'd10w' and d_items.linksto = 'inputevents_cv' ) and datetime(inputevents_cv.charttime,'start of month') = datetime(current_time,'start of month','-1 month')