面试-一道经典的sql语句题
2014-03-28 22:55
323 查看
给一个班级成绩表 student (name,subject,score) ,
查询出所有总分数>600分的学员
找出有三科挂了的学员
查询出所有总分数>600分的学员
select name,sum(score) from student group by name having sum(score)>600;在总分大于600的基础上,去掉不及格的学员并按总分倒序排列。
select name,sum(score) s from student group by name having sum(score)>600 and min(score)>60 order by s desc;
找出有三科挂了的学员
select name from student where score<60 group by name having count(name)>=3;
相关文章推荐
- 面试-一道经典的sql语句题
- 经典SQL语句面试、开发必备
- 50个常用的sql语句 (经典的sql面试题目)
- 面试问了一道sql语句,,唉当场没答出来。。。。
- 一道经典的oracle去重sql语句
- 一道SQL语句的面试题目
- 一些经典的sql 语句
- 经典实用SQL语句
- 经典SQL语句
- 走向面试之数据库基础:一、你必知必会的SQL语句练习-Part 2
- 经典SQL语句大全 收集别人的主要是为了学习的时候查找方便
- 经典SQL语句大全
- 经典sql语句大全
- SQL语句面试题目:一般查询和高级子查询
- 经典SQL语句大全
- 经典SQL语句大全
- 经典SQL语句汇总-1
- 经典SQL语句大全
- 经典SQL语句大全
- 经典SQL语句大全