当前位置:网站首页>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
边栏推荐
- Topsis与熵权法
- 意向不到的Dubug妙招
- How to solve cross domain problems
- C language implementation of three chess
- Docker 安装 Redis-5.0.12(远程访问)
- [learning notes] unreal 4 engine introduction (IV)
- 下一代终端安全管理的关键特征与应用趋势
- Vscode format JSON file
- Promise asynchronous callback function
- [learning notes] unreal 4 engine introduction (III)
猜你喜欢

Shardingsphere data slicing

面试重点——传输层的TCP协议

What is parity? How to use C language?

initializer_ List tool library learning

Fixed and alternate sequential execution of modes

【JUC】并发需要了解的关键字volatile

TOPSIS and entropy weight method

Key and difficult points of C language pointer

Inheritance (the child constructor inherits the attributes in the parent constructor)

initializer_list工具库学习
随机推荐
Write a select drop-down list
Qpprogressbar for QT style (QSS) application
【ManageEngine】ServiceDesk Plus荣获2022安全样板工程数据安全奖
[debug bug] JS: getFullYear is not a function
1223. Dice simulation range DP
死信队列 和消息TTL过期代码
Vscode format JSON file
面试重点——传输层的TCP协议
模式之固定与交替顺序执行
Typescript TS basic knowledge and so on
S4/hana ME21N create Po output control message button missing solution (switch EDI output mode brf+ to Nast mode)
[learning notes] solid works operation record
【MUDUO】EventLoopThreadPool
Lua脚本编写Wireshark插件解析第三方私有协议
firewall 命令简单操作
Leetcode 0135. distribute candy
JS synchronization and asynchrony
结对编程实践心得
VSCode格式化Json文件
typescript ts 基础知识之类