...

/

Solution: Compute Student CGPA

Solution: Compute Student CGPA

We'll cover the following...

Query

SELECT
s.Name,
ROUND(AVG(se.SGPA), 2) AS CGPA
FROM students s
JOIN semesters se ON s.ID = se.StudentID
GROUP BY s.ID, s.Name
ORDER BY CGPA DESC;

Explanation

This query calculates the CGPA (Cumulative Grade Point Average) for each student by taking the average of all their ...

Ask