Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

GATE | GATE CS 2019 | Question 61

  • Difficulty Level : Easy
  • Last Updated : 19 Feb, 2019

A relational database contains two tables Student and Performance as shown below:

The primary key of the Student table is Roll_no. For the Performance table, the columns Roll_no. and Subject_code together from the primary key. Consider the SQL query given below:

SELECT S.Student_name, sum(P.Marks)
FROM Student S, Performance P
WHERE  P.Marks  >  84
GROUP BY S.Student_name;

The number of rows returned by the above SQL query is _________ .

Note: This was Numerical Type question.
(A) 5
(B) 4
(C) 3
(D) None of these.

Answer: (A)

Explanation: In where condition no condition over Roll_no so query produces all groups.

Student_nameSum (P.marks)

Total 5 different student names all 5 group records in result. See:!9/8a79d3/1/0

Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!