SELECT p1.device_id,p1.university, COUNT(question_id) AS question_cnt, COUNT(CASE WHEN p2.result = 'right' THEN 1 ELSE NULL END) AS right_question_cnt FROM user_profile AS p1 LEFT JOIN (SELECT * FROM question_practice_detail WHERE MONTH(date) = 8) AS p2 ON p1.device_id = p2.device_id WHERE...