SQL语言-查询语句(2)
1.查询2016级“市场营销”专业同学选修课程市场营销学”考试的总平均分。
2.查询选修“C005”课程的考试成绩高干2016056144号同学考试成绩的所有同学的学号及考试成绩。
3.列出2016级电子商务专业学生的平均成绩在75分以上的学生名单及相应的平均成绩
4.查询“张计划”教师任课的学生的考试成绩。
5.某课程的同学人数多于5人的教师姓名及所授课程。
6.统计考试总成绩之和大于1400的同学的成绩和
7.列出既学过“市场营销学”又学过“数据库原理与应用”课程的所有学生姓名
1.select avg(score) from performance where grade = '2016' and major = '市场营销' and course='市场营销学';
2.select student_number,score from performance where score > (select score from performance where student_number = '2016056144' and ccourse_no = 'C005') and and ccourse_no = 'C005';
3.select student_number,avg (score) from performance where grade = '2016' and major = '电子商务' group by student_number having avg (score) > 75
4.select student_number,score from performance where teacher = '张计划';
5.select teacher,course from courses group by teacher,course having count(1) > 5
6.select student_number , sum(score) from performance group by student_number having sum(score) > 1400
7.select t1.statudent_name from courses t1 join courses t2 on t1.student_number = t2.student_number and t1.course='市场营销学' and t2.course = '数据库原理与应用‘;
表名以及字段给提供一下啊
这个简单呀,给我表。
没有表吗
自己建个表,或者之间写中文,表达出意思就行
没有表还不好说,你可以随便写表名,随便想个数据关系