Functions are ways to transform one set of data into another. They are defined in modules and are part of the database schema.

For example, consider the function len() used to transform a set of str into a set of int64:

SELECT len({'hello', 'world'});
{5, 5}

Compare that with the aggregate function count() that transforms a set of str into a single int64 value, representing the set cardinality:

SELECT count({'hello', 'world'});

Function SDL, DDL, and introspection.