网站导航网学 原创论文 原创专题 网站设计 最新系统 原创论文 论文降重 发表论文 论文发表 UI设计定制 论文答辩PPT格式排版 期刊发表 论文专题
返回网学首页
网学原创论文
最新论文 推荐专题 热门论文 论文专题
当前位置: 网学 > 编程文档 > SQL SERVER > 正文

50个常用sql语句

论文降重修改服务、格式排版等 获取论文 论文降重及排版 论文发表 相关服务
p;   T2.score AS 马克思,
      T3.score AS UML,
      T4.score AS 数据库,
      ISNULL(T1.score,0) + ISNULL(T2.score,0) + ISNULL(T3.score,0) + ISNULL(T4.score,0) as 总分
      FROM Student,SC  LEFT JOIN SC AS T1
                      ON SC.S# = T1.S# AND T1.C# = ''001''
            LEFT JOIN SC AS T2
                      ON SC.S# = T2.S# AND T2.C# = ''002''
            LEFT JOIN SC AS T3
                      ON SC.S# = T3.S# AND T3.C# = ''003''
            LEFT JOIN SC AS T4
                      ON SC.S# = T4.S# AND T4.C# = ''004''
      WHERE student.S#=SC.S# and
      ISNULL(T1.score,0) + ISNULL(T2.score,0) + ISNULL(T3.score,0) + ISNULL(T4.score,0)
      NOT IN
      (SELECT
            DISTINCT
            TOP 15 WITH TIES
            ISNULL(T1.score,0) + ISNULL(T2.score,0) + ISNULL(T3.score,0) + ISNULL(T4.score,0)
      FROM sc
            LEFT JOIN sc AS T1
                      ON sc.S# = T1.S# AND T1.C# = ''k1''
            LEFT JOIN sc AS T2
                      ON sc.S# = T2.S# AND T2.C# = ''k2''
            LEFT JOIN sc AS T3
                      ON sc.S# = T3.S# AND T3.C# = ''k3''
            LEFT JOIN sc AS T4
                      ON sc.S# = T4.S# AND T4.C# = ''k4''
      ORDER BY ISNULL(T1.score,0) + ISNULL(T2.score,0) + ISNULL(T3.score,0) + ISNULL(T4.score,0) DESC);

23、统计列印各科成绩,各分数段人数:课程I

  • 上一篇资讯: SQLServer连接基础知识
  • 设为首页 | 加入收藏 | 网学首页 | 原创论文 | 计算机原创
    版权所有 网学网 [Myeducs.cn] 您电脑的分辨率是 像素
    Copyright 2008-2020 myeducs.Cn www.myeducs.Cn All Rights Reserved 湘ICP备09003080号 常年法律顾问:王律师