with t as (select device_id, date_format(event_date,'%Y-%m') as d from question_practice_detail group by device_id, date_format(event_date,'%Y-%m') having count(id) > 1), g as (select device_id, date_f...