- Apache Presto Tutorial
- Apache Presto - Home
- Apache Presto - Overview
- Apache Presto - Architecture
- Apache Presto - Installation
- Apache Presto - Configuration
- Apache Presto - Administration
- Apache Presto - SQL Operations
- Apache Presto - SQL Functions
- Apache Presto - MySQL Connector
- Apache Presto - JMX Connector
- Apache Presto - HIVE Connector
- Apache Presto - KAFKA Connector
- Apache Presto - JDBC Interface
- Custom Function Application
- Apache Presto Useful Resources
- Apache Presto - Quick Guide
- Apache Presto - Useful Resources
- Apache Presto - Discussion
Apache Presto - Range Operator
Between operator is used to test the particular value, which exists from minimum to maximum range.
Query 1
presto:default> select 30.5 between 10 and 40 as range;
Result
range ------- true (1 row)
Query 2
presto:default> select 4.5 is null;
Result
_col0 ------- false (1 row)
Here, 4.5 is a value and not null since it is checked with null, so the result is false.
Query 3
presto:default> select 3 is not null;
Result
_col0 ------- true (1 row)
Greatest(x,y)
If the value of x is greater than y, then it returns x, otherwise y.
Query
presto:default> select greatest(200,300) as greatest;
Result
greatest ---------- 300 (1 row)
The output is returned as the greatest of two values.
Least(x,y)
Returns the least value from the two given values.
Query
presto:default> select least('a','b') as result;
Result
result -------- a
Here, the lowest character value is ‘a’ hence it is returned in the result.
apache_presto_basic_sql_operations.htm
Advertisements
To Continue Learning Please Login
Login with Google