- 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 - Arithmetic Operator
Following sample queries are an example of arithmetic operators.
Query 1
presto:default> select 4 + 5 as addition;
Result
addition ---------- 9 (1 row)
From the above result “as” is used for alias for the query.
Query 2
presto:default> select 4.5-3.5 as sub;
Result
sub ----- 1.0 (1 row)
The output is subtraction between two values.
Query 3
presto:default> select 4 % 2 as modulus;
Result
modulus --------- 0 (1 row)
The output is returned as the modulus for given values.
apache_presto_basic_sql_operations.htm
Advertisements