Skip to content

Commit 99bb2e5

Browse files
committed
finish Students and Examinations
1 parent ff4cda9 commit 99bb2e5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
select s.student_id, s.student_name, sub.subject_name, count(e.student_id) as attended_exams
2+
from Students s
3+
join Subjects sub
4+
left join Examinations e
5+
on sub.subject_name = e.subject_name and s.student_id = e.student_id
6+
group by s.student_id, s.student_name, sub.subject_name
7+
order by s.student_id asc;

0 commit comments

Comments
 (0)