GATE Computer Science (CS) 2019 Solved Papers
© examsnet.com
Question : 61
Total: 65
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 ________.
Student
| Roll_no. | Student_name |
| 1 | Amit |
| 2 | Priya |
| 3 | Vinit |
| 4 | Rohan |
| 5 | Smita |
| Roll_no. | Student_code | Marks |
| 1 | A | 86 |
| 1 | B | 95 |
| 1 | C | 90 |
| 2 | A | 89 |
| 2 | C | 92 |
| 3 | C | 80 |
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 ________.
- Your Answer:
Go to Question: