首页 > 试题广场 > 运动会比赛信息的数据库,有如下三个表:  运动员A
[单选题]
运动会比赛信息的数据库,有如下三个表:
运动员ATHLETE(运动员编号 Ano,姓名Aname,性别Asex,所属系名 Adep), 项目 ITEM (项目编号Ino,名称Iname,比赛地点Ilocation), 成绩SCORE (运动员编号Ano,项目编号Ino,积分Score)。
写出目前总积分最高的系名及其积分,SQL语句实现正确的是:(      )
  • SELECT Adep,SUM(Score)FROM ATHLETE,SCORE

    WHERE ATHLETE.Ano=SCORE.Ano GROUP BY Adep HAVING SUM(Score)>=ANY

    (SELECT SUM(Score) FROM ATHLETE,SCORE

    WHERE ATHLETE.Ano=SCORE.Ano GROUP BY Adep)
  • SELECT Adep,SUM(Score)FROM ATHLETE,SCORE

    WHERE ATHLETE.Ano=SCORE.Ano GROUP BY Adep HAVING SUM(Score)>=SOME

    (SELECT SUM(Score) FROM ATHLETE,SCORE WHERE ATHLETE.Ano=SCORE.Ano GROUP BY Adep)
  • SELECT Adep,SUM(Score)FROM ATHLETE,SCORE  WHERE ATHLETE.Ano=SCORE.Ano GROUP BY Adep  HAVING SUM(Score) IN

    (SELECT SUM(Score) FROM ATHLETE,SCORE WHERE ATHLETE.Ano=SCORE.Ano GROUP BY Adep)
  • SELECT Adep,SUM(Score)FROM ATHLETE,SCORE  WHERE ATHLETE.Ano=SCORE.Ano GROUP BY Adep  HAVING SUM(Score)>=ALL

    (SELECT SUM(Score) FROM ATHLETE,SCORE WHERE ATHLETE.Ano=SCORE.Ano GROUP BY Adep)
D是>=ALL,A是>=ANY
发表于 2019-10-06 15:33:01 回复(0)