leetcode 1280 學生們參加各科測試的次數
select s.student_id, s.student_name, st.subject_name, if(e.result, e.result, 0) as attended_exams from Students s join Subjects st left join ( select student_id, subject_name, count(*) as result from Examinations group by student_id, subject_name ) e on s.student_id = e.student_id and st.subject_name = e.subject_name order by s.student_id, st.subject_name
==
标签:測試,1280,參加,st,result,student,subject,id,name From: https://www.cnblogs.com/carlzhang19/p/17393293.html