(e.attended_exams, 0) AS attended_exams FROM Students s CROSS JOIN Subjects sub LEFT JOIN ( SELECT student_id, subject_name, COUNT(*) AS attended_exams FROM Examinations GROUP BY student_id, subject_name ) e US
Table: Examinations 二、题目信息 查询以每个学生参加每项考试的次数,结果按 student_id 和 subject_name 升序排列。 Write an SQL query to find the number of times each student attended each exam. Order the result table by student_id and subject_name. The query result format is in the following ...