Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Using the following tables (primary keys are underlined), write the expressions

ID: 401881 • Letter: U

Question

Using the following tables (primary keys are underlined), write the expressions that follow in SQL. STUDENT (StudentID, StudentName) FACULTY(FacultyID, FacultyName) COURSE(CourseID, CourseName) QUALIFIED(FacultyID, CourseID, DateQualified) SECTION(SectionID, CourseID) REGISTERED(StudentID, SectionID, Semester) 1. List the FacultyIDs of faculty who are qualified to teach ISM6216 and not ISM6220 (note: ISM6216 and ISM6423 are listed under CourseID) 2. List the FacultyIDs of faculty who are qualified to teach both ISM6216 and ISM6423. 3. List the StudentName of students along with CourseName of courses in which they are registered. 4. List the FacultyIDs of faculty who are not qualified to teach any course.

Explanation / Answer

1. select FacultyID from QUALIFIED where CourseID='ISM6216' and CourseID'ISM6220; 2. select FacultyID from QUALIFIED where CourseID='ISM6216' and CourseID='ISM6423'; 3. Select StudentName , CourseName from COURSE c,STUDENT where StudentID=(Select StudentID from REGISTERED where SectionID(Select SectionID from SECTION where CourseID=c.CourseID; 4. select FacultyID from FACULTY where FacultyID not in(Select Unique FacultyID from QUALIFIED);