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;

 

上一篇:MySQL(二)


下一篇:[leetcode]210. Course Schedule II课程表II