very easy sql solution (use distinct)
\nselect class from Courses \ngroup by class\nhaving count(distinct student)>=5;\n
```\nselect class from Courses \ngroup by class\nhaving count(distinct student)>=5;\n```
['MySQL']