Oracle数据库作业-6 查询成绩比该课程平均成绩低的同学的成绩表

33、 查询成绩比该课程平均成绩低的同学的成绩表。

select * from score a where a.degree between 0 and(

select avg(degree) from score b   where a.cno=b.cno ) 

34、 查询所有任课教师的Tname和Depart.

select tname,depart from teacher where tno in(

select tno from course )

35 、 查询所有未讲课的教师的Tname和Depart.

select tname,depart from teacher where tno not in(

select tno from course )

 

36、查询至少有2名男生的班号。

select sclass from student where ssex = '男' group by sclass having count(sno)>=2

37、查询Student表中不姓“王”的同学记录。

select * from student where sname not like '王%'

38、查询Student表中每个学生的姓名和年龄。

39、查询Student表中最大和最小的Sbirthday日期值。

select max(t.sbirthday),min(t.sbirthday) from student t

40、以班号和年龄从大到小的顺序查询Student表中的全部记录。

select * from student order by sclass desc , sbirthday asc

41、查询“男”教师及其所上的课程。

  • 3
    点赞
  • 14
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值