几道oracle题目,求大神帮忙解答

学生信息表里有学号,姓名,班级,性别。成绩表有学号,学科,成绩。班级有c1.c2.c3三个,学科有s1.s2.s3三个。
统计各班各学科的成绩表,输出班级,学科,成绩。
列出各班各学科单科成绩小于60分的,输出班级,学科,学号,姓名,成绩。
列出登记有学生信息,但是没有考试成绩的学生名单,输出班级,学号,姓名。
统计各班各学科的评论成绩,输出班级,学科,平均成绩,按照平均成绩由高到低排列

0

2个回答

1\select a.bj,b.xk,b.score from stu a
left inner join sco b on b.xh=a.xh
group by a.bj,b.xk
2、select a.xh,a.bj,b.xk,b.score from stu a
left inner join sco b on b.xh=a.xh
where b.score<'60'
3\select dinstinct a.xh,a.bj,b.xm from stu a
left inner join sco b on b.xh=a.xh
where b.score is NULL
3\select a.bj,b.xk,avg(b.score) c1 from stu a
left inner join sco b on b.xh=a.xh
group by a.bj,b.xk
order by c1 desc

0

1、
select a.bj, b.xk, avg(b.cj) as pjcj
from xsxxb a
inner join cjb b
on a.xh = b.xh
group by a.bj, b.xk
order by a.bj, b.xk;

2、
select a.bj, b.xk, a.xh, a.xm, b.cj
from xsxxb a
inner join cjb b
on a.xh = b.xh
where b.cj < 60
order by a.bj, b.xk, a.xh;

3、
select a.bj, a.xh, a.xm
from xsxxb a
left join cjb b
on a.xh = b.xh
where b.xh is null;

4、
select a.bj, b.xk, avg(b.cj) as pjcj
from xsxxb a
inner join cjb b
on a.xh = b.xh
group by a.bj, b.xk
order by b.xk, avg(b.cj) desc;

0
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!