下面程序的输出结果是( )。class Student: count = 0 def __init__(self, name): self.name = name Student.count += 1s1 = Student("Alex")s2 = Student("Jack")print(s1.count)
下面程序的输出结果是( )。class Student: count = 0 def __init__(self, name): self.name = name Student.count += 1s1 = Student("Alex")s2 = Student("Jack")print(s1.count)
学生选课数据库中有如下学生表: 学生表(学号,姓名,专业) (对应的英文表示:student(sno,sname,specialty)) 如果要查询各专业的学生人数,下列查询语句中,正确的是( )。 A: SELECT specialty,count(*) FROM student order by specialty; B: SELECT count(specialty) FROM student order by specialty; C: SELECT specialty,count(*) FROM student group by specialty;
学生选课数据库中有如下学生表: 学生表(学号,姓名,专业) (对应的英文表示:student(sno,sname,specialty)) 如果要查询各专业的学生人数,下列查询语句中,正确的是( )。 A: SELECT specialty,count(*) FROM student order by specialty; B: SELECT count(specialty) FROM student order by specialty; C: SELECT specialty,count(*) FROM student group by specialty;
按课程号分类,统计相应的选课人数() A: select cid, count(distinct sid) from sc group by cid B: select cid, count(*) from student group by cid C: select cid, count(distinct cid) from sc group by cid D: select cid, count(distinct sid) from student group by cid
按课程号分类,统计相应的选课人数() A: select cid, count(distinct sid) from sc group by cid B: select cid, count(*) from student group by cid C: select cid, count(distinct cid) from sc group by cid D: select cid, count(distinct sid) from student group by cid
SELECT COUNT(age) FROM student;意思是( ) A: 查student的年龄 B: 查student的所有数据 C: 查student表中年龄的累加 D: 查student表中数据的总条数
SELECT COUNT(age) FROM student;意思是( ) A: 查student的年龄 B: 查student的所有数据 C: 查student表中年龄的累加 D: 查student表中数据的总条数
第4单元,设有学生表student(学号,姓名,系名,课程号,成绩),查询至少选修了4门课程的学生学号及平均成绩的正确语句是() A: SELECT 学号, AVG(成绩) AS 平均成绩 FROM student GROUP BY 学号 HAVING COUNT(课程号)>3; B: SELECT 学号, AVG(成绩) AS 平均成绩 FROM student GROUP BY 课程号 HAVING COUNT(课程号)>3; C: SELECT 学号, AVG(成绩) AS 平均成绩 FROM student GROUP BY 学号 HAVING COUNT(课程号)>4; D: SELECT 学号, AVG(成绩) AS 平均成绩 FROM student GROUP BY 课程号 HAVING COUNT(DISTINCT 学号)>3;
第4单元,设有学生表student(学号,姓名,系名,课程号,成绩),查询至少选修了4门课程的学生学号及平均成绩的正确语句是() A: SELECT 学号, AVG(成绩) AS 平均成绩 FROM student GROUP BY 学号 HAVING COUNT(课程号)>3; B: SELECT 学号, AVG(成绩) AS 平均成绩 FROM student GROUP BY 课程号 HAVING COUNT(课程号)>3; C: SELECT 学号, AVG(成绩) AS 平均成绩 FROM student GROUP BY 学号 HAVING COUNT(课程号)>4; D: SELECT 学号, AVG(成绩) AS 平均成绩 FROM student GROUP BY 课程号 HAVING COUNT(DISTINCT 学号)>3;
下列SQL语句中,能够完成求某列最大值的是()。 A: SELECT AVG(Age) FROM Student B: SELECT MAX(Age) FROM Student C: SELECT MIN(Age) FROM Student D: SELECT COUNT(*) FROM Student
下列SQL语句中,能够完成求某列最大值的是()。 A: SELECT AVG(Age) FROM Student B: SELECT MAX(Age) FROM Student C: SELECT MIN(Age) FROM Student D: SELECT COUNT(*) FROM Student
下列SQL语句中,能够完成求某列最大值的是()。 A: ASELECT AVG(Age) FROM Student B: BSELECT MAX(Age) FROM Student C: CSELECT MIN(Age) FROM Student D: DSELECT COUNT(*) FROM Student
下列SQL语句中,能够完成求某列最大值的是()。 A: ASELECT AVG(Age) FROM Student B: BSELECT MAX(Age) FROM Student C: CSELECT MIN(Age) FROM Student D: DSELECT COUNT(*) FROM Student
统计学生成绩中的最高分,下列语句正确的是 A: SELECT AVG(grade) FROM student; B: SELECT (SUM(grade) / Count(id)) FROM student; C: SELECT MAX(grade) FROM student; D: SELECT MIN(grade) FROM student;
统计学生成绩中的最高分,下列语句正确的是 A: SELECT AVG(grade) FROM student; B: SELECT (SUM(grade) / Count(id)) FROM student; C: SELECT MAX(grade) FROM student; D: SELECT MIN(grade) FROM student;
查询选课门数大于3门的同学学号,姓名, 选课门数Select ______________from student s, scwhere s.sno=sc.sno group by __________having _____________ A: sno, sname, count(*) ; sno, sname; count(*)>3 B: sno, sname, count(*) ; sno; count(*)>3 C: sno, sname, count(cno) ; sno; count(cno)>3 D: sno, sname, count(sno) ; sno; count(sno)>3
查询选课门数大于3门的同学学号,姓名, 选课门数Select ______________from student s, scwhere s.sno=sc.sno group by __________having _____________ A: sno, sname, count(*) ; sno, sname; count(*)>3 B: sno, sname, count(*) ; sno; count(*)>3 C: sno, sname, count(cno) ; sno; count(cno)>3 D: sno, sname, count(sno) ; sno; count(sno)>3
执行语句select count(*) from student,假设执行结果为10,则10表示 A: 表student中值不同的行的总数 B: 表student中行的总数 C: 表student中带有*行的总数 D: 表student中所有数据之和
执行语句select count(*) from student,假设执行结果为10,则10表示 A: 表student中值不同的行的总数 B: 表student中行的总数 C: 表student中带有*行的总数 D: 表student中所有数据之和