Functions

Conversion Functions

  • CAST

Temporal Functions

  • to_string

  • to_timestamp

  • utcnow

  • date_add

  • date_diff

  • extract

Pattern Matching Functions

  • regexp_contains

Aggregate Functions

Function

Argument type

Return type

Description

AVG(expression)

INT, FLOAT, DECIMAL

Decimal for integer input, float for floating point input, otherwise the argument type.

Average.

COUNT(expression) or COUNT(*)

Any row.

INT

Count. Returns 0 for zero matched rows.

MAX(expression)

INT, DECIMAL

Same as the argument type.

Maximum.

MIN(expression)

INT, DECIMAL

Same as the argument type.

Minimum.

SUM(expression)

INT, FLOAT, DOUBLE, DECIMAL

Integer for integer input, float for floating point input, otherwise the argument type.

Sum.

STDDEV_SAMP(expression)

INT, FLOAT, DOUBLE, DECIMAL

Decimal for integer input, float for floating point input, otherwise the argument type.

Sample standard deviation.