← Back to Aggregates & GROUP BY
Question 13
Courses Averaging Above 80
Courses Averaging Above 80
Find the courses whose average posted grade is above 80. Returncode,graded(how many enrollments in the course have a non-NULLgrade) andavg_grade(the averagegrade, rounded to 2 decimal places), sorted byavg_gradedescending.AVGalready skips NULL grades, so the in-progress and dropped rows need noWHERE; the cut-off must be tested after grouping.
Expected result:
+---------+--------+-----------+ | code | graded | avg_grade | +---------+--------+-----------+ | MATH220 | 1 | 95 | | ENG101 | 10 | 81.6 | +---------+--------+-----------+ 2 rows
Hints3 available
Sign in to use hintsTopics:
Aggregates & GROUP BY
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (sel, ins, desc)
Results
Run your SQL to see every statement's output here, then how it compares with the expected answer.
Not sure what is in a table? SHOW TABLES lists them and DESCRIBE students shows the columns — or open the database browser on the left.