Select Id,DeptiD,Marks From (Select Row_Number() Over (Partition By Id Order By Marks Desc) As RwNum,* FROm #Student)DataWhere RwNum = 1
Please have look on the comment
No comments:
Post a Comment