Transactions
August 29, 2024Database-Management-System
August 29, 2024Database-Management-System
Question 817
|
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
3
|
|
2
|
|
0
|
|
1
|
Question 817 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.
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 817 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.
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.
Subscribe
Login
0 Comments