SELECT from Nobel Tutorial
02.SELECT from Nobel Tutorial

注意:where语句中对表示条件的需要用单引号, 下面的译文使用的是有道翻译如有不正确,请直接投诉有道
01.Change the query shown so that it displays Nobel prizes for 1950.
译文:更改显示的查询,使其显示1950年的诺贝尔奖。
SELECT yr, subject, winner FROM nobel WHERE yr = 1950
02.Show who won the 1962 prize for Literature.
译文:展示谁获得了1962年的文学奖。
SELECT winner FROM nobel WHERE yr = 1962 AND subject = 'Literature'
03.Show the year and subject that won 'Albert Einstein' his prize.
译文:展示“爱因斯坦”获奖的年份和主题。
select yr, subject from nobel where winner ='Albert Einstein'
04.Give the name of the 'Peace' winners since the year 2000, including 2000.
译文:请说出自2000年(包括2000年)以来的“和平”获奖者的名字。
select winner from nobel where yr >= 2000 and subject='Peace'
05.Show all details (yr, subject, winner) of the Literature prize winners for 1980 to 1989 inclusive.
译文:展示1980年至1989年包括在内的所有文学奖得主的详细资料(年份、主题、获奖作品)
select * from nobel where (yr between 1980 and 1989) and subject = 'Literature'
06.
Show all details of the presidential winners:
Theodore Roosevelt
Woodrow Wilson
Jimmy Carter
Barack Obama
译文:显示总统候选人的所有信息:
西奥多。罗斯福
伍德罗·威尔逊
吉米•卡特
巴拉克•奥巴马(Barack Obama)
SELECT * FROM nobel
WHERE winner IN ('Theodore Roosevelt',
'Woodrow Wilson',
'Jimmy Carter', 'Barack Obama')
07.Show the winners with first name John
译文:显示姓名的第一个字为约翰的获奖者
select winner from nobel where winner like 'John%'
08.Show the year, subject, and name of Physics winners for 1980 together with the Chemistry winners for 1984.
译文:展示1980年物理获奖者和1984年化学获奖者的年份、科目和名字。
select * from nobel where (yr=1980 and subject='Physics') or (yr=1984 and subject='Chemistry')
09.Show the year, subject, and name of winners for 1980 excluding Chemistry and Medicine
译文:请列出1980年的获奖年份、获奖科目和获奖名单,化学和医学除外
select * from nobel where yr=1980 and subject not in ('Chemistry','Medicine')
10.Show year, subject, and name of people who won a 'Medicine' prize in an early year (before 1910, not including 1910) together with winners of a 'Literature' prize in a later year (after 2004, including 2004)
译文:展示(1910年以前,不包括1910年)获得“医学奖”的人的信息,以及后来(2004年以后,包括2004年)获得“文学奖”的人的信息
select * from nobel where (yr<1910 and subject='Medicine') or (yr>=2004 and subject='Literature')
11.Find all details of the prize won by PETER GRÜNBERG
译文:找到彼得·格伦伯格获得的奖项的所有信息
select * from nobel where winner='PETER GRÜNBERG'
12.Find all details of the prize won by EUGENE O'NEILL
译文:找到尤金·奥尼尔获奖的所有信息
# 查询的名字里面有个单引号 需要使用两个单引号 即’EUGENE O’’NEILL’
select * from nobel where winner ='EUGENE O''NEILL'
13.List the winners, year and subject where the winner starts with Sir. Show the the most recent first, then by name order.
译文:列出获奖者的名字,年份和主题,获奖者以“先生”开头。先显示最近的,然后按名字顺序排列。
select winner,yr,subject from nobel where winner like 'Sir%' order by yr desc, winner asc
14.Show the 1984 winners and subject ordered by subject and winner name; but list Chemistry and Physics last.
译文:显示1984年获奖者和科目排序的科目和获奖者的名字;但是把化学和物理列在最后。
SELECT winner, subject
FROM nobel
WHERE yr=1984
ORDER BY subject in('Physics','Chemistry') ,subject,winner
练习网址:https://sqlzoo.net/wiki/SELECT_from_Nobel_Tutorial
——————————————————————————————————————————————————————————————————————————————————————————————————————————

SELECT from Nobel Tutorial的更多相关文章
- sqlzoo刷题 SELECT from Nobel Tutorial
SELECT from Nobel Tutorial 1.Change the query shown so that it displays Nobel prizes for 1950. SELEC ...
- SQLZOO练习二--SELECT from Nobel Tutorial
We continue practicing simple SQL queries on a single table. This tutorial is concerned with a table ...
- SQLZOO网页中SQL的答案(SELECT from nobel篇)
SELECT from nobel篇 1. 更改查詢以顯示1950年諾貝爾獎的獎項資料. 答案: SELECT yr, subject, winner FROM nobel WHERE yr = 19 ...
- sqlzoo - SELECT from WORLD Tutorial 答案
01.SELECT from WORLD Tutorial 01.显示所有国家的名称,大洲和人口. SELECT name, continent, population FROM world; 02. ...
- MySQL练习题--sqlzoo刷题2
SELECT from Nobel Tutorial 1.Change the query shown so that it displays Nobel prizes for 1950. SELEC ...
- SQLZOO
一.SELECT basics/zh 以顯示德國 Germany 的人口. select population from world where name = 'Germany'; 查詢面積為 5,0 ...
- SQLZOO 习题
https://sqlzoo.net 8. 美國.印度和中國(USA, India, China)是人口又大,同時面積又大的國家.排除這些國家. 顯示以人口或面積為大國的國家,但不能同時兩者.顯示國家 ...
- sqlzoo.net刷题
只发后面提升题目的题解,前面的太简单,写下来也没有意义 12.查找尤金•奧尼爾EUGENE O'NEILL得獎的所有細節 Find all details of the prize won by EU ...
- sqlzoo:3
顯示1980年物理學(physics)獲獎者,及1984年化學獎(chemistry)獲得者. select yr,subject,winner from nobel ) ) 查看1980年獲獎者,但 ...
随机推荐
- 分享一个与jQuery相关的TypeError: $ is not a function问题解决过程
最近碰到一个比较奇葩的问题,估计很多人也遇到过,就是jQuery可能会遇到的‘$ is not a function’,不过我碰到的这个问题比较怪异,解决该问题也颇费了一番周折,现在给大家分享一下. ...
- 为什么Spring Security看不见登录失败或者注销的提示
有很多人在利用Spring Security进行角色权限设计开发时,一般发现正常登录时没问题,但是注销.或者用户名时,直接就回到登录页面了,在登录页面上看不见任何提示信息,如“用户名/密码有误”或“注 ...
- Python数据结构-树与树的遍历
树:是一种抽象的数据类型 树的作用:用来模拟树状结构性质的数据集合 树的特点: 每个节点有零个或者多个节点 没有父节点的节点,叫做根节点 每一个根节点有且只有一个父节点 除了根节点外,每个节点可以分成 ...
- 构建者模式Builder创建对象
构建者(Builder)设计模式(又叫生成器设计模式): 当一个类的内部数据过于复杂的时候(通常是负责持有数据的类,比如Config.VO.PO.Entity...),要创建的话可能就需要了解这个类的 ...
- Netty 源码解析(四): Netty 的 ChannelPipeline
今天是猿灯塔“365篇原创计划”第四篇. 接下来的时间灯塔君持续更新Netty系列一共九篇 Netty 源码解析(一): 开始 Netty 源码解析(二): Netty 的 Channel Netty ...
- FarmCraft,又是Dp
题目依然链接 题意: 从根节点出发,每条边走两遍回到根节点,走边用时1,到达某个节点之后开始计时,到该节点最大的计时数时结束,回到根节点时根节点开始计时.求让所有计时都结束的最小时间. Solve: ...
- day58 bootstrap效果无法显示
在学习bootstrap时直接复制官网的组件的时候,如果效果无法想官网一样显示,最大的可能是类库导入的顺序问题. 打开页面>检查>Console 我们会发现一条报错,导入的js需要jQue ...
- day28 封装
目录 一.什么是封装 二.将封装的属性进行隐藏操作 1 如何隐藏: 1.1 强行访问: 1.2 内部逻辑 三.为何要封装 一.什么是封装 封装是面向对象的三大特性中最核心的一个特性 封装<==& ...
- 数据可视化之PowerQuery篇(十二)客户购买频次分布
https://zhuanlan.zhihu.com/p/100070260 商业数据分析通常都可以简化为对数据进行筛选.分组.汇总的过程,本文通过一个实例来看看PowerBI是如何快速完成整个过程的 ...
- C#文件说明
Bin -- 用来存放编译的结果,是默认的输出路径,项目属性—>配置属性—>输出路径. obj -- 用于存放编译过程中生成的中间临时文件.增量编译:项目属性—>配置属性—>高 ...