sql server 数据库问题
来源:百度知道 编辑:UC知道 时间:2024/05/17 21:46:52
(1)从score表中查询出大于等于平均成绩的所有记录。
(2)显示出AAA库中所有学生的信息及选课成绩。
(3)从score表中按成绩统计并显示出优秀b、良好、及格、不及格各多少人。
(4)查询课程“数据库原理”成绩最高分的学生的姓名。
select * from score where numeric in (select avg(numeric) from score)
select * from students st,score sc where st.学号=sc.学号
你的统计标准都没有,怎么查询!
select count(*) from score where numeric between 90 and 100
select count(*) from score where numeric between 80 and 90
select count(*) from score where numeric between 60 and 80
select count(*) from score where numeric <60
select 姓名 from students st,score sc where st.学号=sc.学号 and sc.课程名 = “数据库原理”
(1)select *
from score x
where grade>=(select AVG(grade)
from score y
where x.sno=y.sno)
(2)select *
from score,students
where students.sno=score.sno
(3)优秀,良好,及格,不及格的等级是怎么分的?
(4)select sname,score
from students,score
where grade in(select MAX(grade)
from score)
and students.sno=score.sno