• 2022-06-04 问题

    查询每门课程被选修的学生数SELECT sc.CId, COUNT(*)FROM scGROUP BY(sc.CId)

    查询每门课程被选修的学生数SELECT sc.CId, COUNT(*)FROM scGROUP BY(sc.CId)

  • 2022-10-26 问题

    ​下列SQL语句中,_____________可以在“学生-课程”数据库正确实现“查询选修并成绩良好3门以上课程的学生学号及其满足条件的课程门数”。‌ A: SELECT Sno,COUNT(*)FROM SCGROUP BY SnoHAVING Grade>=80 AND COUNT(*) >3 B: SELECT Sno,COUNT(*)FROM SCWHERE Grade>=80GROUP BY SnoHAVING COUNT(*) >3 C: SELECT Sno,COUNT(*)FROM SCGROUP BY SnoWHERE Grade>=80HAVING COUNT(*) >3 D: SELECT Sno,COUNT(*)FROM SCGROUP BY SnoWHERE Grade>=80 AND HAVING COUNT(*) >3

    ​下列SQL语句中,_____________可以在“学生-课程”数据库正确实现“查询选修并成绩良好3门以上课程的学生学号及其满足条件的课程门数”。‌ A: SELECT Sno,COUNT(*)FROM SCGROUP BY SnoHAVING Grade>=80 AND COUNT(*) >3 B: SELECT Sno,COUNT(*)FROM SCWHERE Grade>=80GROUP BY SnoHAVING COUNT(*) >3 C: SELECT Sno,COUNT(*)FROM SCGROUP BY SnoWHERE Grade>=80HAVING COUNT(*) >3 D: SELECT Sno,COUNT(*)FROM SCGROUP BY SnoWHERE Grade>=80 AND HAVING COUNT(*) >3

  • 2022-10-26 问题

    ​下列SQL语句中,_________可以在“学生-课程”数据库正确实现“将学生的学号及他的平均成绩定义为一个视图”。‎ A: CREAT VIEW S_G(Sno,Gavg) AS SELECT Sno,AVG(Grade) FROM SCGROUP BY Sno; B: CREAT VIEW S_G(Sno,AVG(Grade)) AS SELECT Sno,AVG(Grade) FROM SCGROUP BY Sno; C: CREAT VIEW S_G AS SELECT Sno,AVG(Grade) FROM SCGROUP BY Sno; D: CREAT VIEW S_G(Sno,Gavg) AS SELECT Sno,AVG(Grade) FROM SCORDER BY Sno;

    ​下列SQL语句中,_________可以在“学生-课程”数据库正确实现“将学生的学号及他的平均成绩定义为一个视图”。‎ A: CREAT VIEW S_G(Sno,Gavg) AS SELECT Sno,AVG(Grade) FROM SCGROUP BY Sno; B: CREAT VIEW S_G(Sno,AVG(Grade)) AS SELECT Sno,AVG(Grade) FROM SCGROUP BY Sno; C: CREAT VIEW S_G AS SELECT Sno,AVG(Grade) FROM SCGROUP BY Sno; D: CREAT VIEW S_G(Sno,Gavg) AS SELECT Sno,AVG(Grade) FROM SCORDER BY Sno;

  • 2022-06-07 问题

    使用jxgl数据库,按课程号统计各门课程的平均分select cno,AVG(score)______ from SCgroup by sno______

    使用jxgl数据库,按课程号统计各门课程的平均分select cno,AVG(score)______ from SCgroup by sno______

  • 2022-06-07 问题

    在MySQL中,假设有学生选课表SC(sno,cno,score)。那么列出所有选修课程超过5门的学生学号以及选修课程数目,其正确的SQL语句为()。 A: select sno,count(cno)from scwhere count(cno)>=5; B: select sno,count(cno)from scgroup by sno where count(cno)>=5; C: select sno,count(cno)from scgroup by sno having count(cno)>=5; D: select sno,count(cno)from scgroup by cno having count(cno)>=5;

    在MySQL中,假设有学生选课表SC(sno,cno,score)。那么列出所有选修课程超过5门的学生学号以及选修课程数目,其正确的SQL语句为()。 A: select sno,count(cno)from scwhere count(cno)>=5; B: select sno,count(cno)from scgroup by sno where count(cno)>=5; C: select sno,count(cno)from scgroup by sno having count(cno)>=5; D: select sno,count(cno)from scgroup by cno having count(cno)>=5;

  • 2022-06-07 问题

    统计每门课程的选课人数select cno , _________from scgroup by ________ A: count(*) ; cno B: count(sno) ; cno C: count(*) ; sno D: count(sno) ; sno

    统计每门课程的选课人数select cno , _________from scgroup by ________ A: count(*) ; cno B: count(sno) ; cno C: count(*) ; sno D: count(sno) ; sno

  • 2022-06-07 问题

    (3)统计选修四门以上课程的学生的学号和总成绩(不统计不及格的课程),并要求按总成绩降序排列出来。正确的SELECT语句是( )。 A: SELECT S B: ,SUM(GRADE) FORM SCGROUP BY S C: HAVING COUNT(*)>=4; D: SELECT S E: ,SUM(GRADE) FORM SCGROUP BY S F: HAVING COUNT(*)>=4ORDER BY SUM(GRADE) DESC; G: SELECT S H: ,SUM(GRADE) FROM SCWHERE GRADE>=60GROUP BY S I: HAVING COUNT(*)>=4ORDER BY SUM(GRADE) DESC; J: SELECT S K: ,SUM(GRADE) FROM SCGROUP BY S L: HAVING GRADE>=60 AND COUNT(*)>=4ORDER BY SUM(GRADE) DESC;

    (3)统计选修四门以上课程的学生的学号和总成绩(不统计不及格的课程),并要求按总成绩降序排列出来。正确的SELECT语句是( )。 A: SELECT S B: ,SUM(GRADE) FORM SCGROUP BY S C: HAVING COUNT(*)>=4; D: SELECT S E: ,SUM(GRADE) FORM SCGROUP BY S F: HAVING COUNT(*)>=4ORDER BY SUM(GRADE) DESC; G: SELECT S H: ,SUM(GRADE) FROM SCWHERE GRADE>=60GROUP BY S I: HAVING COUNT(*)>=4ORDER BY SUM(GRADE) DESC; J: SELECT S K: ,SUM(GRADE) FROM SCGROUP BY S L: HAVING GRADE>=60 AND COUNT(*)>=4ORDER BY SUM(GRADE) DESC;

  • 2022-10-29 问题

    针对数据库S_T,以下创建视图的命令不正确的是( )。 A: create view view1asselect sno,avg(grade)from scgroup by sno B: create view view2asselect sno,sname,sdeptfrom studentwhere sdept='CS' C: create view view3asselect sno,sage+20from studentwhere ssex='女' D: create view view4asselect student.sno,sname,sc.sno,cno,grade from sc,studentwhere sc.sno=student.sno and cno='1'

    针对数据库S_T,以下创建视图的命令不正确的是( )。 A: create view view1asselect sno,avg(grade)from scgroup by sno B: create view view2asselect sno,sname,sdeptfrom studentwhere sdept='CS' C: create view view3asselect sno,sage+20from studentwhere ssex='女' D: create view view4asselect student.sno,sname,sc.sno,cno,grade from sc,studentwhere sc.sno=student.sno and cno='1'

  • 1