sqlcreate table Courese(
student varchar(10) primary key,
class varchar(15)
);
insert into Courese values ('A','math'),('B','en'),('C','math'),('D','bio'),('E','math'),('F','com'),('G','math'),('H','math'),('I','math');
select * from Courese;
select class from Courese group by class having count(student) >=5 ;
select class from
(select class,count(student) as num
from Courese group by class)
as tem where num >=5;
本文作者:yowayimono
本文链接:
版权声明:本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!