...
Database-Management-System
August 29, 2024
Database-Management-System
August 29, 2024
Database-Management-System
August 29, 2024
Database-Management-System
August 29, 2024

Database-Management-System

Question 598
Consider the following tables (relations):

Primary keys in the tables are shown using Underline. Now, Consider the following query:
SELECT S.Name, Sum (P.Marks)
FROM Students S, Performance P
WHERE S.Roll-No = P.Roll-No
GROUP BY S.Name
The number of rows returned by the above query is
A
3
B
2
C
0
D
1
Question 598 Explanation: 
The following table is returned as the result of executing FROM and WHERE commands in given query.

Since in query “GROUP BY S.Name” is given so, firstly Group names having same“Name” value and and then perform SUM() operation on those values. The below table is returned as the result of given query :

So the number of rows returned by given query are 2.
Correct Answer: B
Question 598 Explanation: 
The following table is returned as the result of executing FROM and WHERE commands in given query.

Since in query “GROUP BY S.Name” is given so, firstly Group names having same“Name” value and and then perform SUM() operation on those values. The below table is returned as the result of given query :

So the number of rows returned by given query are 2.
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!