题目内容

针对学生表student(sno,sname,ssex,sage,sdept),其中sno为学号,sname为姓名,ssex为性别,sage为年龄,sdept为系别。查询学生的姓名sname,系别sdept和年龄sage,显示时按系别升序排列,系别相同的再按年龄降序排列。()

A. select * from student order by sdept , sage
B. select sname, sdept, sage from student order by sdept , sage desc
C. select sname, sdept, sage from student order by sdept desc , sage
D. select * from student order by sdept desc, sage

查看答案
更多问题

针对学生选课表sc(sno, cno, grade),其中sno为学号,cno为课程号,grade为成绩。以下哪个操作()统计出每位学生所选课程的最高分和最低分。

A. select sno,max(grade), min(grade) from sc
B. select sno,max(grade), min(grade) from sc order by sno
C. select sno,max(grade), min(grade) from sc group by sno
D. select sno,avg(grade), sum(grade) from sc group by sno

针对表Student(sno, sname, ssex, sage, sdept),其中sno为学号,sname为姓名,ssex为性别,sage为年龄,sdept为系别。查询女生平均年龄超过20岁的系别以及女生平均年龄。

A. select sdept ,avg(sage) from studentwhere ssex='女' and avg(sage) >20group by sdept
B. select sdept ,avg(sage) from student where ssex='女' group by sdept having avg(sage) >20
C. select sdept ,avg(sage) from student where ssex='女' group by sdept
D. select sdept ,avg(sage) from student group by sdept having avg(sage) >20

在学生选课数据库中有学生表student(sno,sname,ssex,sage,sdept),课程表course(cno,cname)及学生选课表sc(sno,cno,grade),其中sno是学号,sname是姓名,ssex是性别,sage是年龄,sdept是系别,cno是课程号,cname是课程名,grade是成绩。以下哪条语句可以实现查询选了课的学生人数()。

A. select count(*)from sc
B. select count(sno) from sc
C. select count(distinct sno) from sc
D. select count(cno) from sc

在学生选课数据库中有学生表student(sno,sname,ssex,sage,sdept),课程表course(cno,cname)及学生选课表sc(sno,cno,grade),其中sno是学号,sname是姓名,ssex是性别,sage是年龄,sdept是系别,cno是课程号,cname是课程名,grade是成绩。要查询选修了“Java程序设计”课的的学生姓名,则SQL语句是: select sname from student,sc ,course where 子句。 这里的where子句的内容是()。

A. student.sno=sc.sno and sc.cno=course.cno and cname='Java程序设计'
B. cname='Java程序设计'
C. student.sno=sc.sno and cname='Java程序设计'
D. sc.cno=course.cno and cname='Java程序设计'

答案查题题库