Question: /*Please write the input to get the displayed Sample Run Program.*/ Write SQL statements to perform the following queries: Display the class roster, including student
/*Please write the input to get the displayed Sample Run Program.*/
Write SQL statements to perform the following queries:
Display the class roster, including student last name, for all students enrolled in section # 1 of CS-101. Display student ID, last name, course ID, and section ID columns.
Sample run:
STUDENT_ID LAST_NAME COURSE SEC_ID ------------------------- --------------- ------ --------
19991 76543 23121
Brandt Brown Chavez
CS-101 1 CS-101 1 CS-101 1
Display a students full name along with his/her majors description.
Sample run:
LAST_NAME FIRST_NAME MAJOR_DESC --------------- --------------- ------------------------- Zhang Jose AAS-Computer Science Shankar Mickey AAS-Computer Science
Display the names of students, who received final grade A in Fall 2009. Display last name, first name, course id, r.section id, and grade columns.
Sample run:
LAST_NAME FIRST_NAME COURSE_ID SEC_ID GR --------------- --------------- ---------- -------- -- Zhang Jose CS-101 1 A Brown Snow CS-101 1 A
Display Spring 2009 course sections with the faculty member assigned to teach the class. Include course sections without any faculty assigned to them. Display course ID, section ID, name, semester ID columns.
Sample run:
COURSE_ID SEC_ID NAME SEME ---------- -------- -------------------- ---- CS-315 1 Srinivasan Sp09 MU-199 1 Mozart Sp09
Display course titles along with their prerequisite names. Display courses without prerequisite also.
Sample run:
COURSE PREREQ -------------------------------------------------- ------------------------- Genetics Intro. to Biology Robotics Intro. to Computer Science
For all faculties in the university who have taught some course, find their names and the course_ID of all courses they taught.
Sample run:
NAME COURSE_ID -------------------- ---------- Srinivasan CS-101 Srinivasan CS-315
Display a list of all students, displaying their ID, and name along with the courses that they have taken.
Sample run:
STUDENT_ID LAST_NAME COURSE_I ------------------------- --------------- --------
00128 00128 12345 12345 12345
Zhang Zhang Shankar Shankar Shankar
CS-101 CS-347 CS-101 CS-190 CS-315
Find names and courses taught for all instructors in the History department. that have taught some course.
Sample run:
NAME COURSE_ID -------------------- ---------- El Said HIS-351
Display the set of all courses taught either in Fall 2009 or in Spring 2010, or both. Sample run:
COURSE_ID TITLE SEME ---------- -------------------------------------------------- ---- CS-101 Intro. to Computer Science Fa09 CS-101 Intro. to Computer Science Sp10 CS-315 Robotics Sp10
Display all classes (course_ID, section_ID) taught by faculty Singh. Display Kim's students (use the format:
that live in New Jersey. Sort the result by last name.
Sample run:
NAME -------------------------------- Brandt, Rajesh Chavez, Deborah George, Tanaka George, Tanaka Levy, Amir
Display faculties (along with their course numbers and section numbers) teaching class sections with students whose last name begins with Z.
Sample run:
NAME COURSE_ID SEC_ID -------------------- ---------- --------
Srinivasan Srinivasan Srinivasan Einstein
CS-347 1 CS-315 1 CS-101 1 PHY-101 1
/*Please write the input to get the displayed Sample Run Program.*/
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
