Question: Write an SQL query that pivots the enrollment data using a filter to show the number of courses taken by each student for each semester
Write an SQL query that pivots the enrollment data using a filter to show the number of courses
taken by each student for each semester across all years. This pivot operation aims to transform
the data from a long format, where each row represents an enrollment record, to a wide format
where each row represents a student, and each column represents a semester, containing the
count of courses taken by the student in that semester.
Deliverables
Submit the SQL query that pivots the course enrollment data as described. The final result should
have columns for student ID year, and additional columns for each semester fall and spring
representing the count of courses taken by each student in those semesters.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
