select rollno, sum(maxmark), sum(obtmark), (sum(maxmark)/sum(obtmark))*100 as percentage from TABLENAME group by rollno
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)