Multiple choice

Select distinct name from students, courses, grades where students.roll_no = grade.roll_no and courses.instructor = Korth and courses.course_no = grades.course_no and grades.grade = A; Which of the following sets is computed by the above query? Tables: Students(roll_no,name,dob) Courses(course_no,course_name,instructor) Grades(roll_no,course_no,grade)

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

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

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

  4. Names of students who have got an A grade in at least one of the courses.

  5. None of these

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Consider the following entries in tables:Students(12,asd,15june)Courses({3,C,korth}, {4,C++,korth})Grades({12,3,A}, {12,4,B})Output: asd Condition: 12 = 12 and korth = Korth and 3 = 3 and A = A As all conditions are true, output is given as Condition: 12 = 12 and korth = Korth and 4 = 4 and B! = AB! = A returns false. As and is used even if one condition is false it will return false. As the condition is true for course 3, and is shown as output.