Open In App

GATE | GATE-CS-2015 (Set 1) | Question 65

Like Article
Like
Save
Share
Report

Consider the following relations:

Q45

SELECT S. Student_Name, sum(P.Marks)
     FROM Student S, Performance P
     WHERE S.Roll_No = P.Roll_No
     GROUP BY S.Student_Name 

The number of rows that will be returned by the SQL query is _________
(A) 0
(B) 1
(C) 2
(D) 3


Answer: (C)

Explanation: Below is result of given query. Note that there are only two student names and query prints sum(P.Marks) for every student.

  Student_Name     Marks
      Raj           310
     Rohit          140 


Quiz of this Question


Last Updated : 28 Jun, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads