刚开始错了几次,首先是因为忽略了能够有学生重复选,后来是因为having条件没有弄对(脑袋一懵,把number给class了,本来想着是给distinct student的)
最终我的查询语句
select class from courses group by class having count(distinct student) >=5
刚开始错了几次,首先是因为忽略了能够有学生重复选,后来是因为having条件没有弄对(脑袋一懵,把number给class了,本来想着是给distinct student的)
最终我的查询语句
select class from courses group by class having count(distinct student) >=5
评论 (0)