Question: 3 . SQL ( 3 0 pts ) The relational schema for a university database is: STUDENTS ( stuID , stuName, Major, Credits ) COURSES

3. SQL (30 pts)
The relational schema for a university database is:
STUDENTS (stuID, stuName, Major, Credits)
COURSES (crsID, facID, Schedule, Room)
FACULTY (facID, facName, Dept, Rank)
ENROLL (enrID, crsID, stuID, Grade)
Answer the following questions using SQL, pay particular attention to the table names and field names, points will be deducted if the exact names are not used.
(a) Find a count of all the students by major. The results should be a two-column table with Major and Number_of_Students. (7 pts)
(b) Find all of the students, the courses they took and the grade they received, sorted first by student then by course. The results should be a three-column table with stuName, crsID, and Grade. (7 pts)
(c) Find an alphabetical list of all the students who have taken a class taught by Adams (assume there is only one faculty member named Adams). The results should be a single column table with the label Students_of_Adams. (8 pts)
(d) Write a SQL statement that will add the following data into the Faculty table: (id=123, name=LaBrie, rank=Associate, and department=Business).(8 pts)
 3. SQL (30 pts) The relational schema for a university database

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!