纯小白解题思路(轻喷)
题库链接:SELECT from Nobel Tutorial - SQLZOO
原题如下:
14.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.
解题思路:
1、首先查询一下subject IN ('Chemistry','Physics')运行后是什么结果
(虽然原题已给提示,但自己还要缕清思路)
代码如下:
select winner,subject,subject in ('chemistry','physics') from nobel
where yr='1984'
查询结果: