GATE CSE · 2019 · CS
Question 51: Databases
Give it a try, then reveal the answer to check your work.
Question 51
CSNAT2 marksNeeds review
A relational database contains two tables Student and Performance as shown below:
Student
Roll no. | Student name |
|---|---|
1 | Amit |
2 | Priya |
3 | Vinit |
4 | Rohan |
5 | Sita |
Performance
Roll no. | Subject_code | Marks |
|---|---|---|
1 | A | 86 |
1 | B | 95 |
1 | C | 90 |
2 | A | 89 |
2 | C | 92 |
3 | C | 80 |
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 ________.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerEXPLORE & PRACTISE
Paper and topic context
See where this question comes from and choose what to practise next.
2019CS
GATE CSE 2019 · Paper 1
Computer Science and Information Technology · Original paper archive
- Section
- Computer Science and Information Technology
- Question type
- Numerical answer (NAT)
- Marks
- 2 marks
Practise related topics
Explore more previous year questions using this question’s imported topic tags.
computer science
GATE CSE previous year questions
information technology
GATE CSE previous year questions
computing
GATE CSE previous year questions
databases
GATE CSE previous year questions
Comments
Ask a question, share your approach, or help someone understand.
Log in to view the discussion
You’re not logged in. Log in or create an account to see discussions and add comments.