Consider the takes relation. Write an SQL query that computes a cross-tab that has a column for
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 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.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Database System Concepts
ISBN: 9780078022159
7th Edition
Authors: Abraham Silberschatz, Henry F. Korth, S. Sudarshan
Question Posted: