数据库原理及应用教程综合实训(4)

2018-12-27 16:05

andStudent.s_no=Choice.s_no

(3)selectStudent.s_no,s_name,Choice.course_no,course_name,score fromclass,Student,Choice,Course

whereclass_name='计算机99-1'andChoice.course_no=Course.course_noand Choice.s_no=Student.s_no

(4)selectStudent.s_no,s_name,sum(course_score)astotal_score

FromStudent

InnerjoinChoiceonStudent.s_no=Choice.s_no

InnerjoinCourseonChoice.course_no=Course.course_noandscore>=60 groupbyStudent.s_no,s_name

(5)selectc.s_no,s.s_name,avg(c.score)average_score,count(*)choice_num

fromChoicec,Studentswherec.s_no=s.s_nogroupbyc.s_no,s.s_name;

(6) selects.s_no,s.s_name,co.course_no,co.course_namefromChoicec,Students,Courseco

wherec.score=0 andc.s_no=s.s_noandco.course_no=c.course_no;

(7) selectst.s_no,st.s_name,co.course_no,co.course_name,co.course_score

fromChoicec,Courseco,Studentst

wherec.score<60 andc.s_no=st.s_noandco.course_no=c.course_no;

(8) selectst.s_name,c.scorefromChoicec,Courseco,Studentstwhere

st.s_no=c.s_noandco.course_no=c.course_noandco.course_name='程序设计语言';

(9) selectst.s_no,st.s_name,c.class_name,co.course_no,co.course_name,ch.score fromStudentst,Classc,Choicech,Courseco

Wherec.class_no=st.class_noandc.class_dept='计算机系'andch.s_no=st.s_noandco.course_no=ch.course_no;

(10) selectte.t_name,co.course_namefromTeachingt,Teacherte,Courseco

wheret.t_no=te.t_noandco.course_no=t.couse_no;

(11)selectt.t_no,te.t_name,count(*)course_number

fromTeachingt,Teacherte wheret.t_no=te.t_no groupbyt.t_no,te.t_name;

(12)select*fromStudentst

wherest.class_noin(selectclass_nofromStudentwheres_name='李建国')

(13)select*fromChoicech,Studentst

wherenotExists(selectcourse_nofromCoursewherecourse_name='计算机基础'andch.course_no!=course_no) andst.s_no=ch.s_no;


数据库原理及应用教程综合实训(4).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:2015.11六年级语文试题

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: