• 2022-07-24
    查询统计选课表SC中成绩列Grade的最小值,可以用_______函数。
    A: Min(Grade)
    B: Max(Grade)
    C: Avg(Grade)
    D: Sum(Grade)
  • A

    内容

    • 0

      查询001号学生选课成绩的平均分,总分,最高分,最低分Selectavg(grade),()(grade),max(grade),min(grade)fromscwheresno=’001’

    • 1

      在学生选课数据库中,查询平均成绩大于等于60分的同学,SQL语句为( ) A: SELECT Sno, AVG(Grade) FROM SC GROUP BY Sno HAVING AVG(Grade)>=60; B: SELECT Sno FROM SC WHERE Grade>=60 GROUP BY Sno; C: SELECT Sno, Grade FROM SC GROUP BY Sno HAVING AVG(Grade)>=60; D: SELECT Sno FROM SC GROUP BY Sno HAVING Grade >=60;

    • 2

      统计学生成绩中的最高分,下列语句正确的是 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

      表sc中存放了多个学生的多门课程的成绩,sno为学号,cno为课程号,grade为成绩。要查询平均分最高的学生学号和平均分,下列()语句可以实现。 A: SELECT top 1 sno,avg(grade) FROM sc group by sno order by avg(grade) desc B: SELECT sno,max(avg(grade)) FROM sc group by sno C: SELECT sno,max(grade), avg(grade) FROM sc group by sno D: SELECT sno,max(grade) FROM sc group by sno

    • 4

      查询平均成绩小于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;