Classes More Than 5 Students

2pts
Canvas

Problem Statement

Educational platforms like Canvas need to track course popularity to allocate server resources and teaching assistants. You need to find which classes are "large" based on enrollment.

Write an SQL query to report all the classes that have at least five students.

Rules:

  • Return the result table containing only the class column.
  • Results must be sorted by class in ascending order.
Tests your understanding of
Basic SQL, Aggregation, HAVING Clause and Grouping

Input Tables

courses
student(VARCHAR)class(VARCHAR)
AMath
BEnglish
CMath
DBiology
EMath
FComputer
GMath
HMath
IMath

Expected Output

class(VARCHAR)
Math

Tags

EasyBasic SQLAggregationHAVING ClauseGrouping
5-10 min
45%

Hints