Question: Consider the takes relation. Write an SQL query that computes a cross-tab that has a column for each of the years 2017 and 2018, and
Consider the takes relation. Write an SQL query that computes a cross-tab that has a column for each of the years 2017 and 2018, and a column for all, and one row for each course, as well as a row for all. Each cell in the table should contain the number of students who took the corresponding course in the corresponding year, with column all containing the aggregate across all years, and row all containing the aggregate across all courses.
Step by Step Solution
3.33 Rating (162 Votes )
There are 3 Steps involved in it
Create a crosstab query by using the Crosstab Query Wizard On the Create ... View full answer
Get step-by-step solutions from verified subject matter experts
