How can I use this query to calculate the max average grade?

SELECT dname, cno, sectno, avg(grade)
FROM enroll
GROUP BY dname, sectno, cno;
SELECT dname, cno, sectno, avg(grade) as avg_grade
FROM enroll
GROUP BY dname, sectno, cno
ORDER BY avg_grade DESC LIMIT 1
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.