• 2022-06-03
    以下()语句可查询选修了三门以上成绩在80分以上课程的学生学号。
    A: select snofromscwhere grade>80groupbysnohavingcount(cno)>3
    B: select snofromscwhere grade>80groupbysnohavingcount(*)>3
    C: select snofromscwhere grade>80 and  count(*)>3groupbysno
    D: elect snofromscwhere grade>80groupbysnohavingcount(sno)>3
  • A,A,B

    举一反三

    内容

    • 0

      查询平均成绩小于70分的学生学号和平均成绩 A: SELECT Sno, AVG(grade) FROM  SC GROUPBYSno B: SELECT Sno, AVG(grade) FROM  SC GROUPBYSno  HAVINGAVG(grade)<70; C: SELECT Sno, grade FROM  SC GROUPBYSno HAVINGAVG(grade)<70;

    • 1

      查询所有有成绩的学生学号和课程号。正确的SELECT语句是()。 A: Select sno , cno from sc where grade < > null B: Select sno as 学号, cno as 课程号 from sc where grade is not null C: Select sno , cno from sc where grade !=‘ ’ D: Select sno , cno from sc where grade is not null

    • 2

      ‏检索选修课程“C2”的学生中成绩最高的学生的学号。正确的SELECT语句是()。‍ A: SELECT SNO FROM SC WHERE CNO='C2' AND GRADE >= ( SELECT GRADE FORM SC WHERE CNO='C2' ); B: SELECT SNO FROM SC WHERE CNO='C2' AND GRADE IN ( SELECT GRADE FORM SC WHERE CNO='C2' ); C: SELECT SNO FROM SC WHERE CNO='C2' AND GRADE NOT IN ( SELECT GRADE FORM SC WHERE CNO='C2' ); D: SELECT SNO FROM SC WHERE CNO='C2' AND GRADE >= ALL ( SELECT GRADE FORM SC WHERE CNO='C2' );

    • 3

      已知学生选课信息表:sc(sno,cno,grade)。查询“至少选修了一门课程,但没有学习成绩的学生学号和课程号”的SQL语句是( )。 A: SELECT sno,cno FROM sc WHERE grade=NULL B: SELECT sno,cno FROM sc WHERE grade IS C: SELECT sno,cno FROM sc WHERE grade IS NULL D: SELECT sno,cno FROM sc WHERE grade=

    • 4

      检索选修了课程”C1”的学生中成绩最高的学生的学号,正确的SELECT语句为( ) A: SELECT Sno FROM SC WHERE Cno=’C1’ AND GRADE &gt;=ALL (SELECT Grade FROM SC WHERE Cno=’C1’); B: SELECT Sno FROM SC WHERE Cno=’C1’ AND GRADE IN (SELECT Grade FROM SC WHERE Cno=’C1’); C: SELECT Sno FROM SC WHERE Cno=’C1’ AND GRADE &gt; ANY (SELECT Grade FROM SC WHERE Cno=’C1’); D: SELECT Sno FROM SC WHERE Cno=’C1’ AND GRADE &gt;= (SELECT Grade FROM SC WHERE Cno=’C1’);