当前位置:网站首页>SQLZOO——Nobel Quiz
SQLZOO——Nobel Quiz
2022-07-25 23:56:00 【Orange teacher】

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
边栏推荐
- How to solve cross domain problems
- 多御安全浏览器手机版将增加新功能,使用户浏览更个性化
- From which dimensions can we judge the quality of code? How to have the ability to write high-quality code?
- 1223. 掷骰子模拟 范围DP
- Redis extended data type (jump table /bitmaps/hyperloglog/geospatial)
- 模式之固定与交替顺序执行
- redis-基本数据类型(String/list/Set/Hash/Zset)
- [ManageEngine] servicedesk plus won the 2022 safety model engineering data safety award
- 回溯——77. 组合
- Bubble sort idea and Implementation
猜你喜欢

Matchmaker's words

2022-07-18 study notes of group 5 self-cultivation class (every day)

利用用户脚本优化 Yandere/Konachan 站点浏览体验

行为型模式之迭代器模式

What is the difference between'1 and'b1 when assigning values

Bubble sort idea and Implementation
![[Muduo] EventLoop event cycle](/img/80/824c7061d58796d454be0c438e257c.png)
[Muduo] EventLoop event cycle

Unexpected dubug tricks

Lua script Wireshark plug-in to resolve third-party private protocols

C# - readonly 和 const 关键字
随机推荐
赋值时'1和'b1有什么区别
C language implementation of three chess
Reduce method of array
Nacos offline service times error errcode: 500
《数据密集型应用系统设计》 - 应用系统概览
initializer_ List tool library learning
MySQL的DDL、DML和DQL的基本语法
Using jetpack libraries in applications
[Muduo] package EventLoop and thread
After entering www.baidu.com in the address bar
死信队列 和消息TTL过期代码
Imitating the magnifying glass effect of JD products -- JS Foundation
@Autowired注解的底层原理
调用钉钉api报错:机器人发送签名过期;solution:签名生成时间和发送时间请保持在 timestampms 以内
Firewall command simple operation
程序员面试金典 4.12 求和路径
Fixed and alternate sequential execution of modes
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
Ten threats to open API ecosystem
行为型模式之责任链模式