Multiple choice

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 Courses. Courses_ number = Grades Courses_ number and Grades. grade = A

Which of the following sets is computed by the above query?

  1. Names of students who have got A grade in all courses taught by Korth.

  2. Names of students who have got A grade in all courses.

  3. Names of students who have got A grade in at least one of the courses taught by Korth.

  4. None of above

Reveal answer Fill a bubble to check yourself
C Correct answer
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, 3 is the correct choice.