select difficult_level,sum(if(result='right',1,0))/count(question_id) as correct_rate from question_practice_detail as a left join question_detail as b using(question_id) where a.device_id in &...