SQL_LeetCode_1280_Students and Examinations


SQL_LeetCode_1280_Students and Examinations

SQL_LeetCode_1280_Students and Examinations 풀이 -- mysql, mssql, oracle -- cross join을 이용하여 카디션 곱을 구한뒤, examinations 테이블을 조인한다. select stu.student_id , stu.student_name , sub.subject_name , count(exam.subject_name) as attended_exams from students stu cross join subjects sub left outer join examinations exam on stu.student_id = exam.student_id and sub.subject_name = exam.subject_name group by stu.student_id, sub.subject_name, stu.student_name order by stu.student_id, sub.subject_name; * 출처 https:/...


#LeetCode_1280_StudentsandExaminations #SQL #SQL_LeetCode_1280 #SQL_LeetCode_1280_StudentsandExaminations #SQL_StudentsandExaminations

원문링크 : SQL_LeetCode_1280_Students and Examinations