Hi Parveen Rathi
Use this query
SELECT Sum(marks) FROM (SELECT grp,marks,ROW_NUMBER() OVER
(PARTITION BY grp ORDER BY grp) AS RowNumber
FROM Table2 ) as RankedTable WHERE RowNumber=1
* Use your table name in the place of Table2
If the marks in the group always same then simply use an
Avg
aggregate or else use the above query.