此图关键在于去重后使用having count查询出大于5的值
select class from courses group by class having count(distinct student) >= 5;