sqlzoo:3
2023-09-14 09:32:37
顯示1980年物理學(physics)獲獎者,及1984年化學獎(chemistry)獲得者。
select yr,subject,winner
from nobel
where (subject='physics' and yr=1980) or(subject='chemistry'and yr=1984)
查看1980年獲獎者,但不包括化學獎(Chemistry)和醫學獎(Medicine)。
select yr,subject,winner
from nobel
where yr=1980 and subject not in('Chemistry','Medicine')
顯示早期的醫學獎(Medicine)得獎者(1910之前,不包括1910),及近年文學獎(Literature)得獎者(2004年以後,包括2004年)。
select yr,subject,winner
from nobel
where (yr <1910 and subject='Medicine') or
(yr>=2004 and subject='Literature')
查找尤金•奧尼爾EUGENE O'NEILL得獎的所有細節 Find all details of the prize won by EUGENE O'NEILL
select *
from nobel
where winner='EUGENE O''NEILL'
列出爵士的獲獎者、年份、獎頁(爵士的名字以Sir開始)。先顯示最新獲獎者,然後同年再按名稱順序排列。
注意降序升序
select winner,yr,subject
from nobel
where winner like'Sir%'
order by yr desc ,winner asc
The expression subject IN ('Chemistry','Physics') can be used as a value - it will be 0 or 1.
Show the 1984 winners and subject ordered by subject and winner name; but list Chemistry and Physics last.
重点在于表达主语IN('Chemistry','Physics')可以用作值 - 它将是0或1。
select winner, subject
from nobel
where yr=1984
order by subject in ('Physics','Chemistry'),subject asc,winner asc
最新文章
- 前端神器avalonJS入门(一)
- Linux 使用 su 切换用户提示 Authentication Failure 的解决方法
- haskell io模块
- Android 源码编译错误
- ubuntu修改文件访问权限
- webform 文件上传(头像上传) 隐藏FileUpload
- Script 代码段
- python 数据类型(列表)学习笔记
- OceanBase里面的rowkey是什么概念,是由哪些要素构成的?
- com.intellij.javaee.oss.admin.jmx.JmxAdminException: com.intellij.execution.ExecutionException idea 导出war 报错
- oracle 11g 64位安装32位客户端和PL/SQL
- Python 模块之 string.py
- 【原创】区分png图片格式和apng图片格式的解决办法
- VC6 LINK : fatal error LNK1168: cannot open Debug/Test.exe for writing
- 统一社会信用代码+组织机构代码 校验 python
- Solidworks实例学习
- Echarts 简单报表系列三:饼状图
- python模块——hashlib模块(简单文件摘要算法实现)
- HADOOP百度云资料
- 【Java】Iterator迭代器总结
热门文章
- VMware 虚拟机 linux执行 ifconfig 命令 eth0没有IP地址(intet addr、Bcast、Mask) UP BROADCAST MULTICAST 问题
- JSP/Serlet 使用fileupload上传文件
- VS发布网站时,报错提示:“未能将文件xxx复制到xxx,未能找到文件xx”三种解决方案!
- Python 数据分析5
- JSONP以及端口
- Windows XP 的最高版本 .net framework 安装
- D - WE POJ - 3273 (二分法)
- Widows自带系统监控工具——24小时监控服务器性能
- Lesson 1-2
- 二丶CSS