In this post I am gonna tell you how to use T-SQL top keyword. Basically top keyword is use to show top records from the result set. Top keyword takes no of rows as an argument and shows them from the result set.
SUM(MarksObtained) 'Marks Obtained'
FROM StudentCourse SC
JOIN StudentInfo SI ON SI.StudentId = SC.StudentId
GROUP BY SC.StudentiD, SI.Name
ORDER BY SI.Name DESC
This is how you can utilize top keyword. Have a nice day.