# SELECT a.device_id, # a.university, # count(question_id) as question_cnt, # sum(if(b.result = 'right',1,0)) as right_question_cnt # FROM user_profile a # LEFT JOIN question_practice_detail b ON a.device_id = b.device_id AND MONTH(`date`)=8 # WHERE a.university = "复旦大学&qu...