select sname,score,
case
when score>=20 and score<30 then 20
when score>=30 and score<40 then 30
when score<=40 and score<50 then 40
else 50
end as score_new from teacher

case_when的更多相关文章

  1. SQl_update,case_when,end

    627.Given a table salary, such as the one below, that has m=male and f=female values. Swap all f and ...

  2. Oracle 常用函数

    主要是对项目中用过的 oracle 函数进行总结,并做出目录,方便后续项目是快速查找,提高效率. 01.Round (数值的四舍五入) 描述:传回一个数值,该数值是按照指定的小数位元数进行四舍五入运算 ...

  3. Lesser known dplyr tricks

    In this blog post I share some lesser-known (at least I believe they are) tricks that use mainly fun ...

  4. 32、Differential Gene Expression using RNA-Seq (Workflow)

    转载: https://github.com/twbattaglia/RNAseq-workflow Introduction RNAseq is becoming the one of the mo ...

  5. R数据分析:数据清洗的思路和核心函数介绍

    好多同学把统计和数据清洗搞混,直接把原始数据发给我,做个统计吧,这个时候其实很大的工作量是在数据清洗和处理上,如果数据很杂乱,清洗起来是很费工夫的,反而清洗好的数据做统计分析常常就是一行代码的事情. ...

  6. (数据科学学习手札134)pyjanitor:为pandas补充更多功能

    本文示例代码及文件已上传至我的Github仓库https://github.com/CNFeffery/DataScienceStudyNotes 1 简介 pandas发展了如此多年,所包含的功能已 ...

随机推荐

  1. 11 November

    Weakness 求数列区间 \(\{a_n\}\) 中满足 \(i < j < k, a_i > a_j > a_k\) 的 \((i, j, k)\) 对的数目. 设对 \ ...

  2. [HDU6403]:Card Game(dfs+DP+基环树)

    题目传送门 题目描述 她依然在我不知道的地方做我不知道的事.桌面上摊开着一些卡牌,这是她平时很爱玩的一个游戏.如今卡牌还在,她却不在我身边.不知不觉,我翻开了卡牌,回忆起了当时一起玩卡牌的那段时间.每 ...

  3. Seaborn 绘图代码

    seaborn单变量.多变量及回归分析绘图 https://blog.csdn.net/llh_1178/article/details/78147822 Python数据科学分析速查表 https: ...

  4. 取得所有网卡的MAC地址,包括禁用的

    先在nuget包中添加System.Management.Automation引用. 然后下面就是代码了. using System;using System.Collections.ObjectMo ...

  5. linux让命令或程序在终端后台运行的方法(Ubuntu/Fedora/Centos等一样适用)

    https://segmentfault.com/a/1190000008314935

  6. mvn 与 pom.xml

    mvn 安装 wget http://mirrors.hust.edu.cn/apache//maven/maven-3/3.0.5/binaries/apache-maven-3.0.5-bin.t ...

  7. sshd使用

    sshd服务 1.sshd介绍     sshd为secure shell的简称:可以通过网络在主机中开机shell的服务 连接方式(在客户端):ssh username@ip  #文本模式      ...

  8. ORACLE DG 库参数db_file_name_convert和log_file_name_convert的作用

    https://www.cnblogs.com/xqzt/p/5089826.html ORACLE DG 库参数db_file_name_convert和log_file_name_convert的 ...

  9. BeautifulSoup模块学习文档

    一.BeautifulSoup简介 1.BeautifulSoup模块 Beautiful Soup 是一个可以从HTML或XML文件中提取数据的Python库.它能够通过你喜欢的转换器实现惯用的文档 ...

  10. Codeforces Round #573

    http://codeforces.com/contest/1191 A 给一个数,可以加0,1或2然后取模,再映射到字母,字母有排名,求最大排名. 总共只有4种情况,讨论即可 #include< ...