college_code male female subject 101 10 25 AAA 101 15 11 BBB 223 15 12 AAA 223 15 12 BBB 223 15 12 CCC 331 11 12 AAA
srno college_code male female subject 1 101 10 25 AAA 2 101 15 11 BBB 1 223 15 12 AAA 2 223 11 11 BBB 3 223 13 15 CCC 1 331 11 12 AAA
SELECT ROW_NUMBER() OVER (ORDER BY college_code) AS srno, college_code , male, female, subject FROM XYZ
SELECT Rank() over (Partition by college_code Order by college_code, subject) as ranks, college_code, male, female, subject FROM College Group By college_code, male, female, subject Order by college_code asc
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)