Answer is (C) 2
The Below Query will return 2 rows
SELECT S.Name, Sum (P.Marks)as Marks FROM Students, Performance P WHERE S.Roll-No=P.Roll-No GROUP BY S.Name
Since, Here Grouping is on S.Name
So, Output will be as below
Name Marks
Ramesh 280
Mukesh 155
If the query will be as below then we get 3 rows
SELECT S.Roll-No, S.Name, Sum (P.Marks) as Marks FROM Students, Performance P WHERE S.Roll-No=P.Roll-No GROUP BY S.Roll-No, S.Name
Output of the above query by using the given tables in the question output will be as below
Roll-No Name Marks
18CS101 Ramesh 125
18CS102 Mukesh 155
18CS103 Ramesh 155