zoukankan      html  css  js  c++  java
  • Oracle查询12-19题等

    12、查询Score表中至少有5名学生选修的并以3开头的课程的平均分数。

    select cno,count(cno),avg(degree) from score t group by cno having count(cno)>=5 and substr(cno,0,1)='3'

    13、查询分数大于70,小于90的Sno列。

    select degree from score s where degree between 70 and 90;

    14、查询所有学生的Sname、Cno和Degree列。

    select s.sname,sc.cno,sc.degree from STUDENT s,score sc where s.sno=sc.sno

    15、查询所有学生的Sno、Cname和Degree列。

    select s.sno,c.cname,s.degree from score s,course c where s.cno=c.cno;

    16、查询所有学生的Sname、Cname和Degree列。

    select s.sname,c.cname,sc.degree from student s,course c,score sc where s.sno=sc.sno and  c.cno=sc.cno

    17、 查询“95033”班学生的平均分。

    select class,cno,avg(degree) from score,student t  where class='95033' group by cno,class

    19、  查询选修“3-105”课程的成绩高于“109”号同学成绩的所有同学的记录。

    Select sno,degree from score t where cno='3-105'
    and degree>(select degree from score t where cno='3-105'and sno='109')

  • 相关阅读:
    java关键字-static
    java内部类
    绘制椭圆
    画出一个三角形
    创建和使用画刷
    画刷使用
    绘制矩形
    在getview方法中有三个参数,起到优化的部分为ViewHolder的使用,主要方法setTag(),getTag()
    SecondContract 接口类
    SecondModel 实现类
  • 原文地址:https://www.cnblogs.com/miss123/p/5579548.html
Copyright © 2011-2022 走看看