GATE CS 2019 · Question 61 · Databases · Numerical answer (NAT) · 2 marks · no negative marks

A relational database contains two tables Student and Performance as shown below:
Student
Performance
The primary key of the Student table is Roll_no. For the Performance table, the columns Roll_no. and Subject_code together form 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 ______.

Roll_no.Student_name
1Amit
2Priya
3Vinit
4Rohan
5Smita
Roll_no.Subject_codeMarks
1A86
1B95
1C90
2A89
2C92
3C80
Answer

Answer 5

Answer from the official GATE CS 2019 answer key.

The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes