当前位置:网站首页>SQLZOO——Nobel Quiz
SQLZOO——Nobel Quiz
2022-07-25 23:53:00 【橙子教师】

1. Pick the code which shows the name of winner's names beginning with C and ending in n
SELECT winner
FROM nobel
WHERE winner LIKE 'C%' AND winner LIKE '%n'2. Select the code that shows how many Chemistry awards were given between 1950 and 1960
SELECT COUNT(subject)
FROM nobel
WHERE subject = 'Chemistry' AND yr BETWEEN 1950 and 19603. Pick the code that shows the amount of years where no Medicine awards were given
SELECT COUNT(DISTINCT yr)
FROM nobel
WHERE yr NOT IN
( SELECT DISTINCT yr
FROM nobel
WHERE subject = 'Medicine')4. Select the result that would be obtained from the following code:
SELECT subject, winner
FROM nobel
WHERE winner LIKE 'Sir%' AND yr LIKE '196%'
5. Select the code which would show the year when neither a Physics or Chemistry award was given
SELECT yr
FROM nobel
WHERE yr NOT IN
( SELECT yr
FROM nobel
WHERE subject IN ('Chemistry','Physics'))6. Select the code which shows the years when a Medicine award was given but no Peace or Literature award was
SELECT DISTINCT yr
FROM nobel
WHERE subject='Medicine'
AND yr NOT IN
( SELECT yr
FROM nobel
WHERE subject='Literature')
AND yr NOT IN
( SELECT yr
FROM nobel
WHERE subject='Peace')7. Pick the result that would be obtained from the following code:
SELECT subject, COUNT(subject)
FROM nobel
WHERE yr ='1960'
GROUP BY subject
边栏推荐
- 统计之歌 歌词
- Shardingsphere data slicing
- Song of statistics lyrics
- 意向不到的Dubug妙招
- 意向不到的Dubug妙招
- Key features and application trends of next generation terminal security management
- Payment terms in SAP message No. vg202 IDoc e1edk18 have been transferred: check data
- 图的遍历-DFS,BFS(代码详解)
- utility实用组件学习之swap,move,forward,exchange
- JS synchronization and asynchrony
猜你喜欢

numeric学习之iota,accumulate

Program environment and pretreatment

How does JS judge whether the current date is within a certain range

Docker installation redis-5.0.12 (remote access)

Unexpected dubug tricks

Ratio of learning_ add,ratio_ subtract,ratio_ multiply,ratio_ Use of divide

SAP Message No. VG202 IDoc E1EDK18 中付款条款已经转移:检查数据
![[learning notes] unreal 4 engine introduction (IV)](/img/30/4defa3cbd785d43adb405c71d16406.png)
[learning notes] unreal 4 engine introduction (IV)

initializer_list工具库学习
![[testing technology automated testing pytest] basic summary of pytest](/img/30/7c632cd6ad93c9294745dda7642f17.png)
[testing technology automated testing pytest] basic summary of pytest
随机推荐
Query commodity cases (operate data with array addition method) / key points
Leetcode 0135. distribute candy
[ManageEngine] servicedesk plus won the 2022 safety model engineering data safety award
Bubble sort idea and Implementation
[day.2] Joseph Ring problem, how to use arrays to replace circular linked lists (detailed explanation)
获取马蜂窝酒店数据
ArcGIS cuts TIF images (grid data) according to the vector range, merges shp files in batches, cuts vectors in the region according to the vector range, outputs the geographic coordinate system, conve
Using jetpack libraries in applications
Call nailing API and report an error: the signature sent by the robot is expired; Solution: please keep the signature generation time and sending time within timestampms
LeetCode 0135. 分发糖果
热部署和热加载有什么区别?
[learning notes] unreal 4 engine introduction (III)
S4/hana ME21N create Po output control message button missing solution (switch EDI output mode brf+ to Nast mode)
ratio学习之ratio_add,ratio_subtract,ratio_multiply,ratio_divide的使用
Programmer interview Golden Classic 4.12 summation path
Generating random number random learning uniform_ int_ distribution,uniform_ real_ distribution
Swap, move, forward, exchange of utility component learning
《数据密集型应用系统设计》 - 应用系统概览
Redis extended data type (jump table /bitmaps/hyperloglog/geospatial)
Array merge method: concat()