Skip to Content
Presto实战
book

Presto实战

by Matt Fuller, Manfred Moser, Martin Traverso
March 2021
Intermediate to advanced
265 pages
6h 50m
Chinese
Posts & Telecom Press
Content preview from Presto实战
高级
SQL
特性
151
WHERE year > 2010 AND year < 2014
GROUP BY carrier, year;
avg_arrival_delay | carrier
--------------------+---------
11.755326255888736 | 9E
12.557365851045104 | AA
13.39056266711295 | AA
13.302276406082575 | AA
6.4657695873247745 | AS
7.048865559750841 | AS
6.907012760530203 | AS
17.008730526574663 | B6
13.28933909176506 | B6
16.242635221309246 | B6
...
9.4
 逻辑运算符
SQL
Presto
中还有三个
逻辑运算符
AND
OR
NOT
。运算符
AND
OR
双目运算符
因为它们接受两个参数作为输入。
NOT
是一个单目运算符,它只接受一个参数作为输入。
这些逻辑运算符接收
BOOLEAN
类型的输入数据,返回单个布尔变量
TRUE
FALSE
NULL
UNKNOWN
)。通常,这些运算符组合使用形成条件子句,就像布尔运算符那样。
这三个运算符的概念与编程语言相似,但由于
NULL
值的存在,语义有所不同。例如,
NULL
AND NULL
不等于
TRUE
,而是等于
NULL
。如果你把
NULL
看作值的缺失,这就很容易理解了。 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

大数据项目管理:从规划到实现

大数据项目管理:从规划到实现

Ted Malaska, Jonathan Seidman
Google系统架构解密: 构建安全可靠的系统

Google系统架构解密: 构建安全可靠的系统

Heather Adkins, Betsy Beyer, Paul Blankinship, Piotr Lewandowski, Ana Oprea, Adam Stubblefield

Publisher Resources

ISBN: 9787115560056