求软件测试面试题中的sql题目
发布网友
发布时间:2022-04-24 13:19
我来回答
共2个回答
热心网友
时间:2022-04-08 00:34
2.查询所有班级的名称,和所有版中女生人数和女生的平均分。 1. select * from student where score>80 and s_id in (select sid from student_,fuidoj
热心网友
时间:2022-04-08 01:52
create table t1 (
stuid int ,
courseid int,
indexTimes int,
score int
)
go
insert into t1 values(1001,1,1,50);
insert into t1 values(1001,1,2,51);
insert into t1 values(1001,1,3,52);
insert into t1 values(1001,1,4,80);
insert into t1 values(1001,1,5,55);
insert into t1 values(1001,1,6,10);
insert into t1 values(1001,2,1,70);
insert into t1 values(1001,2,2,51);
insert into t1 values(1001,2,3,52);
insert into t1 values(1001,2,4,50);
insert into t1 values(1001,2,5,53);
insert into t1 values(1001,2,6,90);
insert into t1 values(1002,1,1,40);
insert into t1 values(1002,1,2,58);
insert into t1 values(1002,1,3,58);
insert into t1 values(1002,1,4,54);
insert into t1 values(1002,1,5,53);
insert into t1 values(1002,1,6,75);
insert into t1 values(1002,1,7,52);
insert into t1 values(1002,2,1,40);
insert into t1 values(1002,2,2,58);
insert into t1 values(1002,2,3,54);
insert into t1 values(1002,2,4,54);
insert into t1 values(1002,2,5,53);
insert into t1 values(1002,2,6,55);
insert into t1 values(1002,2,7,82);
insert into t1 values(1002,3,1,80)
insert into t1 values(1002,3,2,80)
insert into t1 values(1002,3,3,50)
insert into t1 values(1002,3,4,30)
insert into t1 values(1002,3,5,20)
insert into t1 values(1002,4,1,80)
insert into t1 values(1002,4,2,40)
insert into t1 values(1002,4,3,30)
insert into t1 values(1002,4,4,20)
insert into t1 values(1002,4,5,10)
insert into t1 values(1002,4,6,81)
go
--检索出某同学、某科目连续4次或4次以上不及格的学号和课程编号