山东大学数据库实验八

该数据库实验涉及对操作系统和数据结构课程的成绩进行分析。实验创建了多个表格,包括按学院和科目平均分的统计,以及特定学院学生在这两门课程中的最高分记录。最后,进行了不同类型的表连接操作,如左连接、内连接和全外连接,以整合和对比所有相关数据。
摘要由CSDN通过智能技术生成
1.create table test81 as
(select pub.STUDENT_course.SID,pub.STUDENT.DNAME,max(score) as score
from pub.STUDENT,pub.STUDENT_COURSE,pub.COURSE
where pub.STUDENT_COURSE.SID=pub.student.sid
and pub.STUDENT_COURSE.CID=pub.course.cid
and pub.COURSE.NAME='操作系统'
and dname is not null
group by pub.STUDENT_COURSE.SID,pub.STUDENT.DNAME)
create table test811 as
(select dname,round(avg(score),0) as avg_os_score
from test81
group by dname)
create table test812 as(
select dname,pub.STUDENT_COURSE.SID,max(score) as score
from pub.STUDENT,pub.STUDENT_COURSE,pub.COURSE
where pub.STUDENT_COURSE.SID=pub.student.sid
and pub.STUDENT_COURSE.cid=pub.course.cid
and pub.COURSE.NAME='数据结构'
and dname is not null
group by dname,pub.STUDENT_COURSE.SID)
create table test813 as
(select dname,round(avg(score),0) as avg_ds_score
from test812
group by dname)
create table test8_01 as
(select *
from test811 natural left join test813)
2。create table te
  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值