如何计算CGPA

时间:2014-04-28 07:05:37

标签: mysql sql

亲爱的我想在每个学期结束时计算CGPA 如何计算所有Semseters的CGAP

SELECT SNO, SEMESTER, SUM(CRH), SUM(GP), SUM(GP)/SUM(CRH) GPA
from STUDENT_EXAM
WHERE SNO = 1
GROUP BY SNO, SEMESTER;

-

Student No  Semester    Credit Hours    Grade Point GPA CGPA
1       1       18      60      3.33    
        2       6       15      2.50    
        3       18      22      1.22    
        4       18      38      2.11    
        5       6       12      2.00    
        6       18      58      3.22    
        7       18      55      3.06    
        8       6       21      3.50    

0 个答案:

没有答案