赞
踩
目录
select avg(salary) from emp where name != '董事长';
select role,avg(salary) '平均工资' from emp group by role;
- select role,avg(salary) '平均工资' from emp
- group by role having avg(salary) < 10000;
- select score, stu.name '学生名字', c.name '课程名字' from score s, student stu, course c
- where s.student_id = stu.id and s.course_id = c.id and stu.name = '许仙';
- select stu.classes_id,stu.sn,stu.qq_mail,stu.name, sum(score) '总分' from score sc, student stu
- where sc.student_id = stu.id group by stu.sn;
- select stu.name '学生姓名', c.name'课程名', sc.score from score sc, student stu, course c
- where sc.student_id = stu.id and sc.course_id = c.id;
- select * from student stu left join score sc on sc.student_id = stu.id;
- select * from student stu right join score sc on sc.student_id = stu.id;
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。