1.掌握SELECT语句的基本语法格式。
2.掌握SELECT语句的执行方法。
3.掌握SELECT语句的from子句,多表连接查询
使用数据库choose,完成以下数据查询要求。
- 检索平均成绩高于70分的学生的学生信息及平均成绩。
- select student.student_no,student_name,avg(score) from choose,student where choose.student_no=student.student_no group by student.student_no, student_name having avg(score)>70; ( 全连接 )
思考:join连接怎么实现?
- select student.student_no,student_name,avg(score) from student join choose using(student_no) group by student.student_no, student_name having avg(score)>70;
- 按照学生的学号以及课程号升序的方式,查询所有学生的课程分数。(降)