HTMLify
Day 41
Views: 2 | Author: djdj
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # Write your MySQL query statement below SELECT s.student_id, s.student_name, sub.subject_name, COUNT(e.subject_name) AS attended_exams FROM Students s CROSS JOIN Subjects sub LEFT JOIN Examinations e ON s.student_id = e.student_id AND sub.subject_name = e.subject_name GROUP BY s.student_id, s.student_name, sub.subject_name ORDER BY s.student_id, sub.subject_name; |