# FUNCTIONS

Functions are pre-built actions that perform calculations, manipulate data, and return results. At the most fundamental level, these functions simplify complex queries and automate repetitive tasks. Common SQL functions include string, numeric, date/time, conditional, and aggregate functions.

Usually, there are two types of functions. One work as if they are applied to each row separately (for each row, the result of the function does not depend on the other rows). The other (aggregate functions) accumulate a set of values from various rows (i.e. they depend on the entire set of rows). In addition, AI functions are specifically designed to streamline AI operations, while table functions are used for data migration between MyScale and other systems.

We divide functions into several types according to the data type they operate on.