题库 软件开发 题目列表 中兴经常会举办各种比赛,假设现在有一张表contestInf...
单选题
中兴经常会举办各种比赛,假设现在有一张表contestInfo(student_id, contest_id), 其中student_id表示学生id,contest_id表示比赛的id,如果想要知道每个学生参加了中兴举办了多少次比赛,那么可以使用以下哪个sql语句实现?
A.

select student_id, sum(contest_id) from contestInfo ;

B.

select student_id, sum(contest_id) from contestInfo group by student_id;

C.

select student_id, count(contest_id) from contestInfo;

D.

select student_id, count(contest_id) from contestInfo group by student_id;

E.

select student_id, max(contest_id) from contestInfo;

F.

select student_id, max(contest_id) from contestInfo group by student_id;

题目信息
校招真题
-
正确率
0
评论
19
点击