Q. Shanaya Khanna is using a table Employee. It has the following columns:


Admno, Name, Agg, Stream


[column Agg contains Aggregate marks]


She wants to display highest Agg obtained in each Stream.

She wrote the following statement:


SELECT Stream, MAX(Agg) FROM Employee ;


But she did not get the desired result. Rewrite the above query with necessary change to help get the desired output.


Answer =

SELECT Stream, MAX(Agg)
FROM Employee
GROUP BY Stream;

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post