顯示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')可以用作值 - 它将是01

select winner, subject
from nobel
where yr=1984
order by subject in ('Physics','Chemistry'),subject asc,winner asc

最新文章

  1. 前端神器avalonJS入门(一)
  2. Linux 使用 su 切换用户提示 Authentication Failure 的解决方法
  3. haskell io模块
  4. Android 源码编译错误
  5. ubuntu修改文件访问权限
  6. webform 文件上传(头像上传) 隐藏FileUpload
  7. Script 代码段
  8. python 数据类型(列表)学习笔记
  9. OceanBase里面的rowkey是什么概念,是由哪些要素构成的?
  10. com.intellij.javaee.oss.admin.jmx.JmxAdminException: com.intellij.execution.ExecutionException idea 导出war 报错
  11. oracle 11g 64位安装32位客户端和PL/SQL
  12. Python 模块之 string.py
  13. 【原创】区分png图片格式和apng图片格式的解决办法
  14. VC6 LINK : fatal error LNK1168: cannot open Debug/Test.exe for writing
  15. 统一社会信用代码+组织机构代码 校验 python
  16. Solidworks实例学习
  17. Echarts 简单报表系列三:饼状图
  18. python模块——hashlib模块(简单文件摘要算法实现)
  19. HADOOP百度云资料
  20. 【Java】Iterator迭代器总结

热门文章

  1. VMware 虚拟机 linux执行 ifconfig 命令 eth0没有IP地址(intet addr、Bcast、Mask) UP BROADCAST MULTICAST 问题
  2. JSP/Serlet 使用fileupload上传文件
  3. VS发布网站时,报错提示:“未能将文件xxx复制到xxx,未能找到文件xx”三种解决方案!
  4. Python 数据分析5
  5. JSONP以及端口
  6. Windows XP 的最高版本 .net framework 安装
  7. D - WE POJ - 3273 (二分法)
  8. Widows自带系统监控工具——24小时监控服务器性能
  9. Lesson 1-2
  10. 二丶CSS