/  Yamcs Server Manual  /  SQL Language  /  Functions

Functions

COALESCE()

COALESCE(value1, value2, value3, ...)

The COALESCE() function returns the first value from the list of arguments that is not NULL, or NULL if there is none.

UNHEX()

UNHEX(str)

The UNHEX() function interpretes the given argument as a hexadecimal string, and returns a binary value.

EXTRACT_SHORT()

EXTRACT_SHORT(binary, offset)

Decodes 16 bits signed at the specified offset, returning a short value.

EXTRACT_USHORT()

EXTRACT_USHORT(binary, offset)

Decodes 16 bits unsigned at the specified offset, returning an integer value.

EXTRACT_INT()

EXTRACT_INT(binary, offset)

Decodes 32 bits signed at the specified offset, returning an integer value.

EXTRACT_U3BYTES()

EXTRACT_U3BYTES(binary, offset)

Decodes 24 bits unsigned at the specified offset, returning an integer value.

COUNT()

COUNT(*)
COUNT(column)

Aggregate function that counts the number of rows in a table that match the specified WHERE clause.

SUBSTRING()

SUBSTRING(str, offset)
SUBSTRING(str, offset, length)

Returns a substring of the given string, starting at the specified character offset.

SUM()

SUM(column)

Aggregate function that returns the sum of the values of a given column for all rows in a table that match the specified WHERE clause.