Question: This assignment is to give you practice using SQL. It uses the university schema shown below. The boxes are entities (tables), the table name is
This assignment is to give you practice using SQL. It uses the university schema shown below. The boxes are entities (tables), the table name is at the top in the blue box, the attributes are shown in each box. The primary key for each table is underlined. The arrows indicate foreign key relationships.

Use the database that you have built and write and run the following queries. Save your queries in a script that you will hand in. Your queries should be general and work for any set of data, not just the data that is currently in the database. Be sure that you check your answers by looking at the data. Just because your query runs and produces results doesn't mean that the query is correct!
10) For each student who has taken a course, list their name, the name of the student's department and the name of the course that they have taken.
11) Make a list containing each student's name and the number of unique courses that they have taken in each year. Your output should have 3 columns, Student Name, Year and Number of Courses.
Schema Diagram for University Database student takes ID course_id N sec id semester year grade ID name dept_name tot_cred course advisor section course id sec id semester year building room_no time_slot_id course id title dept_name credits department dept name building budget s id i id time_slot time_slot id day start_time end_time instructor classroom building room_no capacity prereq course_id prereg_id ID name dept_name salary teaches ID course_id sec_id semester year Database System Concepts - 6th Edition 2.8 Silberschatz, Korth and Sudarshan
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
