LogoLogo
  • Welcome to e6data
  • Introduction to e6data
    • Concepts
    • Architecture
      • e6data in VPC Deployment Model
      • Connect to e6data serverless compute
  • Get Started
  • Sign Up
  • Setup
    • AWS Setup
      • In VPC Deployment (AWS)
        • Prerequisite Infrastructure
        • Infrastructure & Permissions for e6data
        • Setup Kubernetes Components
        • Setup using Terraform in AWS
          • Update a AWS Terraform for your Workspace
        • AWS PrivateLink and e6data
        • VPC Peering | e6data on AWS
      • Connect to e6data serverless compute (AWS)
        • Workspace Creation
        • Catalog Creation
          • Glue Metastore
          • Hive Metastore
          • Unity Catalog
        • Cluster Creation
    • GCP Setup
      • In VPC Deployment (GCP)
        • Prerequisite Infrastructure
        • Infrastructure & Permissions for e6data
        • Setup Kubernetes Components
        • Setup using Terraform in GCP
        • Update a GCP Terraform for your Workspace
      • Connect to e6data serverless compute (GCP)
    • Azure Setup
      • Prerequisite Infrastructure
      • Infrastructure & Permissions for e6data
      • Setup Kubernetes Components
      • Setup using Terraform in AZURE
        • Update a AZURE Terraform for your Workspace
  • Workspaces
    • Create Workspaces
    • Enable/Disable Workspaces
    • Update a Workspace
    • Delete a Workspace
  • Catalogs
    • Create Catalogs
      • Hive Metastore
        • Connect to a Hive Metastore
        • Edit a Hive Metastore Connection
        • Delete a Hive Metastore Connection
      • Glue Metastore
        • Connect to a Glue Metastore
        • Edit a Glue Metastore Connection
        • Delete a Glue Metastore Connection
      • Unity Catalog
        • Connect to Unity Catalog
        • Edit Unity Catalog
        • Delete Unity Catalog
      • Cross-account Catalog Access
        • Configure Cross-account Catalog to Access AWS Hive Metastore
        • Configure Cross-account Catalog to Access Unity Catalog
        • Configure Cross-account Catalog to Access AWS Glue
        • Configure Cross-account Catalog to Access GCP Hive Metastore
    • Manage Catalogs
    • Privileges
      • Access Control
      • Column Masking
      • Row Filter
  • Clusters
    • Edit & Delete Clusters
    • Suspend & Resume Clusters
    • Cluster Size
    • Load Based Sizing
    • Auto Suspension
    • Query Timeout
    • Monitoring
    • Connection Info
  • Pools
    • Delete Pools
  • Query Editor
    • Editor Pane
    • Results Pane
    • Schema Explorer
    • Data Preview
  • Notebook
    • Editor Pane
    • Results Pane
    • Schema Explorer
    • Data Preview
  • Query History
    • Query Count API
  • Connectivity
    • IP Sets
    • Endpoints
    • Cloud Resources
    • Network Firewall
  • Access Control
    • Users
    • Groups
    • Roles
      • Permissions
      • Policies
    • Single Sign-On (SSO)
      • AWS SSO
      • Okta
      • Microsoft My Apps-SSO
      • Icons for IdP
    • Service Accounts
    • Multi-Factor Authentication (Beta)
  • Usage and Cost Management
  • Audit Log
  • User Settings
    • Profile
    • Personal Access Tokens (PAT)
  • Advanced Features
    • Cross-Catalog & Cross-Schema Querying
  • Supported Data Types
  • SQL Command Reference
    • Query Syntax
      • General functions
    • Aggregate Functions
    • Mathematical Functions & Operators
      • Arithematic Operators
      • Rounding and Truncation Functions
      • Exponential and Root Functions
      • Trigonometric Functions
      • Logarithmic Functions
    • String Functions
    • Date-Time Functions
      • Constant Functions
      • Conversion Functions
      • Date Truncate Function
      • Addition and Subtraction Functions
      • Extraction Functions
      • Format Functions
      • Timezone Functions
    • Conditional Expressions
    • Conversion Functions
    • Window Functions
    • Comparison Operators & Functions
    • Logical Operators
    • Statistical Functions
    • Bitwise Functions
    • Array Functions
    • Regular Expression Functions
    • Generate Functions
    • Cardinality Estimation Functions
    • JSON Functions
    • Checksum Functions
    • Unload Function (Copy into)
    • Struct Functions
  • Equivalent Functions & Operators
  • Connectors & Drivers
    • DBeaver
    • DbVisualiser
    • Apache Superset
    • Jupyter Notebook
    • Tableau Cloud
    • Tableau Desktop
    • Power BI
    • Metabase
    • Zeppelin
    • Python Connector
      • Code Samples
    • JDBC Driver
      • Code Samples
      • API Support
    • Configure Cluster Ingress
      • ALB Ingress in Kubernetes
      • GCE Ingress in Kubernetes
      • Ingress-Nginx in Kubernetes
  • Security & Trust
    • Best Practices
      • AWS Best Practices
    • Features & Responsibilities Matrix
    • Data Protection Addendum(DPA)
  • Tutorials and Best Practices
    • How to configure HIVE metastore if you don't have one?
    • How-To Videos
  • Known Limitations
    • SQL Limitations
    • Other Limitations
    • Restart Triggers
    • Cloud Provider Limitations
  • Error Codes
    • General Errors
    • User Account Errors
    • Workspace Errors
    • Catalog Errors
    • Cluster Errors
    • Data Governance Errors
    • Query History Errors
    • Query Editor Errors
    • Pool Errors
    • Connectivity Errors
  • Terms & Condition
  • Privacy Policy
    • Cookie Policy
  • FAQs
    • Workspace Setup
    • Security
    • Catalog Privileges
  • Services Utilised for e6data Deployment
    • AWS supported regions
    • GCP supported regions
    • AZURE supported regions
  • Release Notes & Updates
    • 6th Sept 2024
    • 6th June 2024
    • 18th April 2024
    • 9th April 2024
    • 30th March 2024
    • 16th March 2024
    • 14th March 2024
    • 12th March 2024
    • 2nd March 2024
    • 10th February 2024
    • 3rd February 2024
    • 17th January 2024
    • 9th January 2024
    • 3rd January 2024
    • 18th December 2023
    • 12th December 2023
    • 9th December 2023
    • 4th December 2023
    • 27th November 2023
    • 8th September 2023
    • 4th September 2023
    • 26th August 2023
    • 21st August 2023
    • 19th July 2023
    • 23rd May 2023
    • 5th May 2023
    • 28th April 2023
    • 19th April 2023
    • 15th April 2023
    • 10th April 2023
    • 30th March 2023
Powered by GitBook
On this page

Equivalent Functions & Operators

Compare values and expressions for equality and similarity.

e6data
Athena

current_date()

current_date

current_date(timezone)

current_date AT TIME ZONE timezone

current_timestamp()

current_timestamp

current_timestamp(timezone)

current_timestamp AT TIME ZONE timezone

last_day( <date/datetime expr> )

date_trunc('month', date) + interval '1' month - interval '1' day

date_trunc(unit, <expr> )

DATE_TRUNC('unit', timestamp)

date_add(unit, value, <date expr>)

date_add(unit, value, timestamp)

date_diff( <date expr1>, <date expr2>, [<unit> optional])

date_diff(unit, timestamp1, timestamp2)

timestamp_add(unit, value, <timestamp expr>)

date_add(unit, value, timestamp)

timestamp_diff(<timestamp expr1>, <timestamp expr2>, unit)

date_diff(unit, timestamp1, timestamp2)

to_timestamp( <expr> )

to_timestamp(string, format)

datetime(<expr>, <time zone>)

<exp> AT TIME ZONE <time zone>

from_unixtime(<expr>, [<unit> optional])

from_unixtime(unixtime)

to_unix_timestamp( <expr> )

to_unixtime(expr)

format_date( <expr>, format)

format_datetime(timestamp, format)

format_timestamp(<expr>, format)

format_datetime(timestamp, format)

extract( unit FROM <datetime expr>)

extract(field FROM x)

current_timestamp + interval '8' minute

timestamp '2012-10-31 01:00' + interval '1' month

array_to_string( <expr>, delimiter)

array_join(x, delimiter, null_replacement)

json_value( <json expr>, <json-path>)

json_extract_scalar(json, json_path)

e6data
BigQuery

approx_quantiles( <expr>, number)

APPROX_QUANTILES( expression, number)

current_date()

current_date()

current_date(timezone)

CURRENT_DATE([time_zone])

current_timestamp()

CURRENT_TIMESTAMP()

current_timestamp(timezone)

DATETIME(CURRENT_TIMESTAMP(), "America/Los_Angeles")

last_day( <date/datetime expr> )

last_day( <date/datetime expr> )

date_trunc(unit, <expr> )

DATE_TRUNC(date_expression, unit)

date_add(unit, value, <date expr>)

DATE_ADD(date_expression, INTERVAL int64_expression date_part)

date_diff( <date expr1>, <date expr2>, [<unit> optional])

DATE_DIFF(date_expression_a, date_expression_b, date_part)

timestamp_add(unit, value, <timestamp expr>)

DATETIME_ADD(datetime_expression, INTERVAL int64_expression part)

timestamp_diff(<timestamp expr1>, <timestamp expr2>, unit)

DATETIME_DIFF(datetime_expression_a, datetime_expression_b, part)

to_timestamp( <expr> )

TIMESTAMP(string_expression[, time_zone])

datetime(<expr>, <time zone>)

DATETIME(timestamp_expression [, time_zone])

from_unixtime(<expr>, [<unit> optional])

format_timestamp("%Y-%m-%d", timestamp_seconds(time))

to_unix_timestamp( <expr> )

UNIX_SECONDS(expr)

format_date( <expr>, format)

FORMAT_DATE(format_string, date_expr)

format_timestamp(<expr>, format)

FORMAT_DATETIME(format_string, datetime_expression)

extract( unit FROM <datetime expr>)

EXTRACT(part FROM date_expression)

current_timestamp + interval '8' minute

current_timestamp + interval '8' minute

array_to_string( <expr>, delimiter)

ARRAY_TO_STRING(array_expression, delimiter[, null_text])

json_value( <json expr>, <json-path>)

JSON_VALUE(json_expr[, json_path])

e6data
Databricks

current_date()

current_date()

current_date(timezone)

from_utc_timestamp(current_date(),timezone)

current_timestamp()

current_timestamp()

current_timestamp(timezone)

from_utc_timestamp(current_timestamp(),timezone)

last_day( <date/datetime expr> )

last_day(expr)

date_trunc(unit, <expr> )

date_trunc(unit, expr)

date_add(unit, value, <date expr>)

dateadd(unit, value, expr)

date_diff( <date expr1>, <date expr2>, [<unit> optional])

datediff(endDate, startDate)

timestamp_add(unit, value, <timestamp expr>)

timestampadd(unit, value, expr)

timestamp_diff(<timestamp expr1>, <timestamp expr2>, unit)

timestampdiff(unit, start, end)

to_timestamp( <expr> )

to_timestamp(expr [, fmt] )

datetime(<expr>, <time zone>)

from_utc_timestamp(expr, timeZone)

from_unixtime(<expr>, [<unit> optional])

from_unixtime(unixTime [, fmt])

to_unix_timestamp( <expr> )

to_unix_timestamp(expr [, fmt] )

format_date( <expr>, format)

date_format(expr, fmt)

format_timestamp(<expr>, format)

date_format(expr, fmt)

extract( unit FROM <datetime expr>)

extract(field FROM source)

datepart( unit, <expr> )

date_part(field, expr)

current_timestamp + interval '8' minute

caldate + interval '1 second'

array_to_string( <expr>, delimiter)

array_join(array, delimiter [, nullReplacement])

e6data
Presto

current_date()

current_date

current_date(timezone)

current_date AT TIME ZONE timezone

current_timestamp()

current_timestamp

current_timestamp(timezone)

current_timestamp AT TIME ZONE timezone

last_day( <date/datetime expr> )

last_day_of_month(x)

date_trunc(unit, <expr> )

date_trunc(unit, x)

date_add(unit, value, <date expr>)

date_add(unit, value, timestamp)

date_diff( <date expr1>, <date expr2>, [<unit> optional])

date_diff(unit, timestamp1, timestamp2)

timestamp_add(unit, value, <timestamp expr>)

date_add(unit, value, timestamp)

timestamp_diff(<timestamp expr1>, <timestamp expr2>, unit)

date_diff(unit, timestamp1, timestamp2)

to_timestamp( <expr> )

to_timestamp(string, format)

datetime(<expr>, <time zone>)

<exp> AT TIME ZONE <time zone>

from_unixtime(<expr>, [<unit> optional])

from_unixtime(unixtime)

to_unix_timestamp( <expr> )

to_unixtime(expr)

format_date( <expr>, format)

format_datetime(timestamp, format)

format_timestamp(<expr>, format)

format_datetime(timestamp, format)

extract( unit FROM <datetime expr>)

extract(field FROM x)

current_timestamp + interval '8' minute

timestamp '2012-10-31 01:00' + interval '1' month

array_to_string( <expr>, delimiter)

array_join(x, delimiter, null_replacement)

json_value( <json expr>, <json-path>)

json_extract_scalar(json, json_path)

e6data
Redshift

current_date()

current_date

current_date(timezone)

current_date AT TIME ZONE timezone

current_timestamp()

current_timestamp

current_timestamp(timezone)

current_timestamp AT TIME ZONE timezone

last_day( <date/datetime expr> )

LAST_DAY ( { date | timestamp } )

date_trunc(unit, <expr> )

DATE_TRUNC('unit', timestamp)

date_add(unit, value, <date expr>)

DATEADD( datepart, interval, {date|time|timetz|timestamp} )

date_diff( <date expr1>, <date expr2>, [<unit> optional])

DATEDIFF ( datepart, {date|time|timetz|timestamp}, {date|time|timetz|timestamp} )

timestamp_add(unit, value, <timestamp expr>)

DATEADD( datepart, interval, {date|time|timetz|timestamp} )

timestamp_diff(<timestamp expr1>, <timestamp expr2>, unit)

DATEDIFF ( datepart, {date|time|timetz|timestamp}, {date|time|timetz|timestamp} )

to_timestamp( <expr> )

to_timestamp (timestamp, format)

datetime(<expr>, <time zone>)

<exp> AT TIME ZONE <time zone>

from_unixtime(<expr>, [<unit> optional])

timestamp 'epoch' + CAST(your_timestamp_column AS BIGINT)/1000 * interval '1 second'

to_unix_timestamp( <expr> )

extract(epoch from CURRENT_DATE)

format_date( <expr>, format)

TO_CHAR (timestamp_expression | numeric_expression , 'format')

format_timestamp(<expr>, format)

TO_CHAR (timestamp_expression | numeric_expression , 'format')

extract( unit FROM <datetime expr>)

EXTRACT ( datepart FROM { TIMESTAMP 'literal' | timestamp | time | timetz } )

datepart( unit, <expr> )

DATE_PART(datepart, {date|timestamp})

current_timestamp + interval '8' minute

caldate + interval '1 second'

json_value( <json expr>, <json-path>)

json_extract_path_text('json_string', 'path_elem' [,'path_elem'[, …] ] [, null_if_invalid ] )

e6data
Snowflake

current_date()

current_date()

current_date(timezone)

convert_timezone('UTC','timestamp', current_date())

current_timestamp()

current_timestamp()

current_timestamp(timezone)

convert_timezone('UTC','timestamp', current_timestamp())

last_day( <date/datetime expr> )

LAST_DAY( <date_or_time_expr> [ , <date_part> ] )

date_trunc(unit, <expr> )

DATE_TRUNC( <date_or_time_part>, <date_or_time_expr> )

date_add(unit, value, <date expr>)

DATEADD( <date_or_time_part>, <value>, <date_or_time_expr> )

date_diff( <date expr1>, <date expr2>, [<unit> optional])

DATEDIFF( <date_or_time_part>, <date_or_time_expr1>, <date_or_time_expr2> )

timestamp_add(unit, value, <timestamp expr>)

TIMESTAMPADD( <date_or_time_part> , <time_value> , <date_or_time_expr> )

timestamp_diff(<timestamp expr1>, <timestamp expr2>, unit)

TIMESTAMPDIFF( <date_or_time_part> , <date_or_time_expr1> , <date_or_time_expr2> )

to_timestamp( <expr> )

to_timestamp( <expr> )

datetime(<expr>, <time zone>)

CONVERT_TIMEZONE( <target_tz> , <source_timestamp> )

from_unixtime(<expr>, [<unit> optional])

TO_TIMESTAMP( epoch_sec )

to_unix_timestamp( <expr> )

date_part('epoch_second',current_timestamp())

format_date( <expr>, format)

TO_VARCHAR( <date_or_time_expr> [, '<format>' ] )

format_timestamp(<expr>, format)

TO_VARCHAR( <date_or_time_expr> [, '<format>' ] )

extract( unit FROM <datetime expr>)

EXTRACT( <date_or_time_part> FROM <date_or_time_expr> )

datepart( unit, <expr> )

DATE_PART( <date_or_time_part> , <date_or_time_expr> )

current_timestamp + interval '8' minute

caldate + interval '1 second'

array_to_string( <expr>, delimiter)

ARRAY_TO_STRING( <array> , <separator_string> )

json_value( <json expr>, <json-path>)

JSON_EXTRACT_PATH_TEXT( <column_identifier> , '<path_name>' )

PreviousStruct FunctionsNextConnectors & Drivers

Last updated 1 year ago