MySql(三)任务

项目三

show tables;
create table courses(
 student varchar(32) not null,
 class varchar(32) not null);
insert into courses(student,class)
 ->values('A','Math'),
              ('B','Englist'),
            ('C','Math'),
            ('D',Biology'),
            ('E','Math'),
            ('F','Computer'),
            ('G','Math'),
            ('H','Math'),
            ('I','Math'),
            ('A','Math');
select class from courses group by class having count(*)>=5;

 

posted on 2019-04-04 16:44  NetDevOps  阅读(92)  评论(0编辑  收藏  举报

导航