Consider the tables Students(Roll-No, Name) and Performance(Roll-No, Course, Marks) shown below; Students also contains the row (18CS103, Ramesh). Primary keys are underlined. Consider the 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 is
Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: C. 2
Explanation
Grouping is on Name, and there are only two distinct names (Ramesh for 18CS101 and 18CS103, Mukesh for 18CS102). So 2 rows.
More Database Management Systems questions
- A clustering index is defined on the fields which are of type
- In RDBMS, which type of Join returns all rows that satisfy the join condition ?
- Consider a relation book (title, price) which contains the titles and prices of different books. Assuming that no two books have the same p…
- In a Hierachical database, a hashing function is used to locate the ________.
- Relations produced from E - R Model will always be in ________.
- Consider the following schedules involving two transactions: S₁: r₁(X); r₁(Y); r₂(X); r₂(Y); w₂(Y); w₁(X) S₂: r₁(X); r₂(X); r₂(Y); w₂(Y); r…