Skip to main content

Tips and Tricks

Data types

Window functions

Window functions are functions that grab additional data per row, e.g. row_number() which adds a row number from the order by clause.

Values

COALESCE(value1, ..., default_value) returns the first argument that is not null.

CASE allows if else statements for a value

NULLIF(value1, value2) returns NULL, if value1 matches value2

round(value1, decimals) can round a number to n decimals

CAST() can convert a value to a target type

String functions

Mathematical functions

Datetime

Datetime functions and operations

Datetime formatting