Consider the set of relations shown below and the SQL query that follows.
Students: (Roll_number, Name, Date_of_birth) Courses: (Course number, Course_name, Instructor) Grades: (Roll_number, Course_number, Grade)
select distinct Name from Students, Courses, Grades where Students. Roll_number = Grades.Roll_number and Courses.Instructor = Korth and Courses.Course_number = Grades.Course_number and Grades.grade = A
Which of the following sets is computed by the above query?
(A) Names of students who have got an A grade in all courses taught by Korth
(B) Names of students who have got an A grade in all courses
(C) Names of students who have got an A grade in at least one of the courses taught by Korth
(D) None of the above
Explanation: The query gives the name of all the students who have scored “A” grade in any of the courses that are taught by Korth.
So, C is the correct choice.
Please comment below if you find anything wrong in the above post.
Quiz of this Question