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')

  • 相关阅读:
    tcp示例
    udp示例
    str 和 bytes
    Xamarin UIProgressView自定义
    个人用Canvas开发HTML5小游戏
    canvas画一个h5小游戏
    用canvas写一个h5小游戏
    react js踩坑之路(一)
    捣腾一下 webpack+gulp 使用姿势~
    关于移动端的适配
  • 原文地址:https://www.cnblogs.com/miss123/p/5579548.html
Copyright © 2011-2022 走看看