# Function total table

This document lists the function supported by the latest version of MatrixOne.

## Aggregation Function

| Function Name | Function |
| -------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| [ANY_VALUE()](Aggregate-Functions/any-value.md) | Optional value in the parameter range to return |
| [AVG()](Aggregate-Functions/avg.md) | Calculate the arithmetic average of the parameter column. |
| [BITMAP](Aggregate-Functions/bitmap.md) | A set of built-in functions for processing bitmaps, mainly used to calculate different values |
| [BIT_AND()](Aggregate-Functions/bit_and.md) | Calculate the bitwise and |
| [BIT_OR()](Aggregate-Functions/bit_or.md) | Calculate the bitwise or|
| [BIT_XOR()](Aggregate-Functions/bit_xor.md) | Calculate the bitwise XOR of all bits in the column|
| [COUNT()](Aggregate-Functions/count.md) | The number of records of query results was calculated|
| [GROUP_CONCAT()](Aggregate-Functions/group-concat.md)| Join together content specified by columns or expressions|
| [MAX()](Aggregate-Functions/max.md) | Returns the maximum value of a set of values |
| [MEDIAN()](Aggregate-Functions/median.md) | Returns the median value of a set of values |
| [MIN()](Aggregate-Functions/min.md) | Returns the minimum value of a set of values|
| [STDDEV_POP()](Aggregate-Functions/stddev_pop.md) | Used to calculate the population standard deviation|
| [SUM()](Aggregate-Functions/sum.md) | Used to calculate the sum of a set of values |
| [VARIANCE()](Aggregate-Functions/variance.md) | Used to calculate the population variance|
| [VAR_POP()](Aggregate-Functions/var_pop.md) | Used to calculate the population variance|

## Date and time class function

| Function Name | Function |
| ---------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| [CONVERT_TZ()](Datetime/convert-tz.md) | Used to convert a given date time from one time zone to another. |
| [CURDATE()](Datetime/curdate.md) |Return the value in the current date in YYYY-MM-DD format |
| [CURRENT_TIMESTAMP()](Datetime/current-timestamp.md)|Return the current date and time in the format of YYYY-MM-DD hh:mm:ss or YYYYMMDDhhmmss|
| [DATE()](Datetime/date.md) |Seave the date part in the input in DATE or DATETIME format. |
| [DATE_ADD()](Datetime/date-add.md) | Used to perform date operations: add the specified time interval from the specified date|
| [DATE_FORMAT()](Datetime/date-format.md) |Format date value according to format string |
| [DATE_SUB()](Datetime/date-sub.md) | Used to perform date operation: subtract the specified time interval from the specified date|
| [DATEDIFF()](Datetime/datediff.md) |Returns the number of days between two dates |
| [DAY()](Datetime/day.md) | Return to the date of the month|
| [DAYOFYEAR()](Datetime/dayofyear.md) |Return the number of days in one year corresponding to the date|
| [EXTRACT()](Datetime/extract.md) | Extract some content from date|
| [HOUR()](Datetime/hour.md) |Return the number of hours of time|
| [FROM_UNIXTIME()](Datetime/from-unixtime.md) |Convert the internal UNIX timestamp value to a date and time value in normal format, and display it in YYYY-MM-DD HH:MM:SS or YYYYMMDDHHMMSS format |
| [MINUTE()](Datetime/minute.md) |Return the minute of the time parameter|
| [MONTH()](Datetime/month.md) |Return the month of the date parameter|
| [NOW()](Datetime/now.md) | Returns the value in the 'YYY-MM-DD HH:MM:SS' format of the current date and time. |
| [SECOND()](Datetime/second.md) |Return the number of seconds of the time parameter|
| [STR_TO_DATE()](Datetime/str-to-date.md) | Convert string to date or date time type according to the specified date or time display format|
| [SYSDATE()](Datetime/sysdate.md) | Returns the value in the 'YYY-MM-DD HH:MM:SS' format of the current date and time. |
| [TIME()](Datetime/time.md) | Extract the time part of the time or date time and return it as a string |
| [TIMEDIFF()](Datetime/timediff.md) |Return the difference between two time parameters|
| [TIMESTAMP()](Datetime/timestamp.md) |Return the date or date time parameter as date time value|
| [TIMESTAMPDIFF()](Datetime/timestampdiff.md) |Returns an integer representing the time interval between the first date-time expression and the second date-time expression within a given time unit|
| [TO_DATE()](Datetime/to-date.md) | Convert string to date or date time type according to the specified date or time display format|
| [TO_DAYS()](Datetime/to-days.md) | Used to calculate the number of days difference between a given date and the start date of the calendar (January 1, 0000)|
| [TO_SECONDS()](Datetime/to-seconds.md) | Used to calculate the difference in seconds between a given date or date time expr and January 1, 0 AD 0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:
| [UNIX_TIMESTAMP](Datetime/unix-timestamp.md) |Returns the number of seconds from 1970-01-01 00:00:00 UTC to the specified time|
| [UTC_TIMESTAMP()](Datetime/utc-timestamp.md) |Return the current UTC time in the format of YYYY-MM-DD hh:mm:ss or YYYYMMDDhhmmss|
| [WEEK()](Datetime/week.md) | Used to calculate the number of weeks for a given date|
| [WEEKDAY()](Datetime/weekday.md) | Return the index of the working day of the date (0 = Monday, 1 = Tuesday, ... 6 = Sunday) |
| [YEAR()](Datetime/year.md) |Returns the year of the given date|

## Mathematical function

| Function Name | Function |
| ----------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| [ABS()](Mathematical/abs.md) | Used to find the absolute value of the parameter|
| [ACOS()](Mathematical/acos.md) | Used to find the cosine (in radians) of a given value |
| [ATAN()](Mathematical/atan.md) | Used to find the arctangent of a given value (in radians) |
| [CEIL()](Mathematical/ceil.md) | Used to find the minimum integer not smaller than the parameter|
| [CEILING()](Mathematical/ceiling.md) | Used to find the minimum integer not smaller than the parameter|
| [COS()](Mathematical/cos.md) | Used to find the cosine value of the input parameter (denoted in radians)|
| [COT()](Mathematical/cot.md) | Used to find the cotangent value of the input parameter (denoted in radians) || [EXP()](Mathematical/exp.md) | Used to find the index of a number with the natural constant e as the base|
| [FLOOR()](Mathematical/floor.md)| Used to find the corresponding digit not greater than a certain number |
| [LN()](Mathematical/ln.md) | Used to find the natural logarithm of the parameters|
| [LOG()](Mathematical/log.md) | Used to find the natural logarithm of the parameters|
| [LOG2()](Mathematical/log2.md) | Used to find the logarithm of the base 2 parameter|
| [LOG10()](Mathematical/log10.md)| Used to find the logarithm of the base 10 parameter|
| [PI()](Mathematical/pi.md) | Used to find mathematical constant π (pi)|
| [POWER()](Mathematical/power.md)| POWER(X, Y) is used to find the Y power index value of X|
| [ROUND()](Mathematical/round.md)| Used to find the value of a number after rounding a specific digit|
| [RAND()](Mathematical/rand.md) | Used to generate a random number of Float64 type between 0 and 1|
| [SIN()](Mathematical/sin.md) | Used to find the sine value of the input parameter (denoted in radians)|
| [SINH()](Mathematical/sinh.md) | Used to find the hyperbolic sine value of the input parameters (denoted in radians) |
| [TAN()](Mathematical/tan.md) | Used to find the tangent value of the input parameter (denoted in radians). |

## String class function

| Function Name | Function |
| -------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| [BIN()](String/bin.md) | Convert the parameter to a binary string form. |
| [BIT_LENGTH()](String/bit-length.md) | Returns the length of the string str, in bit. |
| [CHAR_LENGTH()](String/char-length.md) | Return the length of the string str in characters|
| [CONCAT()](String/concat.md) | Concatenate multiple strings (or only one string) into one string |
| [CONCAT_WS()](String/concat-ws.md) | Represents Concatenate With Separator, which is a special form of CONCAT(). |
| [EMPTY()](String/empty.md) | Determine whether the entered string is empty. |
| [ENDSWITH()](String/endswith.md) | Check whether it ends with the specified suffix. |
| [FIELD()](String/field.md) | Returns the position of the first string str in the string list (str1,str2,str3,...) |
| [FIND_IN_SET()](String/find-in-set.md) | Find the location of the specified string in a comma-separated list of strings. |
| [FORMAT()](String/format.md) | Used to set the number format to "#,###,##.##" format and round to one after the decimal point. |
| [FROM_BASE64()](String/from_base64.md) | Used to convert Base64-encoded strings back to original binary data (or text data). |
| [HEX()](String/hex.md) | Return the hexadecimal string form of the parameter|
| [INSTR()](String/instr.md) | Returns the location where the substring first appears in the given string. |
| [LCASE()](String/lcase.md) | Used to convert the given string to lowercase. |
| [LEFT()](String/left.md) | Returns the leftmost length character in the str string. |
| [LENGTH()](String/length.md) | Returns the length of the string. |
| [LOCATE()](String/locate.md) | Function used to find the location of a substring in a string. |
| [LOWER()](String/lower.md) | Used to convert the given string to lowercase. |
| [LPAD()](String/lpad.md) | Used to fill on the left side of the string. |
| [LTRIM()](String/ltrim.md) | Remove the front space of the input string and return the processed characters. |
| [MD5()](String/md5.md) | Generates an input string to a 32-character hexadecimal MD5 hash value. |
| [OCT()](String/oct.md) | String that returns the octal value of the parameter|
| [REPEAT()](String/repeat.md) | Used to repeat the entered string n times and return a new string|
| [REVERSE()](String/reverse.md) | Flip the characters in the str string in order to output. |
| [RPAD()](String/rpad.md) | Used to fill on the right side of the string |
| [RTRIM()](String/rtrim.md) | Remove the space behind the input string|
| [SHA1()/SHA()](String/sha1.md) | Used to calculate and return the SHA-1 hash value of the given string. |
| [SHA2()](String/sha2.md) | Returns the SHA2 hash value of the input string. |
| [SPACE()](String/space.md) | Returns a string composed of N spaces. |
| [SPLIT_PART()](String/split_part.md) | Used to break a string into parts based on a given separator|
| [STARTSWITH()](String/startswith.md) | String returns 1 if it starts with the specified prefix, otherwise returns 0. |
| [SUBSTRING()](String/substring.md) | Returns a substring starting from the specified location|
| [SUBSTRING_INDEX()](String/substring-index.md)| Get characters of different index bits with the delimiter as the index. |
| [TO_BASE64()](String/to_base64.md) | String used to convert strings to Base64 encoded strings|
| [TRIM()](String/trim.md) | Returns a string, deleting unwanted characters. |
| [UCASE()](String/ucase.md) | Used to convert the given string to uppercase. |
| [UNHEX()](String/unhex.md) | Used to convert a hexadecimal string to the corresponding binary string. |
| [UPPER()](String/upper.md) | Used to convert the given string to uppercase. |

## Regular expressions

| Function Name | Function |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| [NOT REGEXP()](String/Regular-Expressions/not-regexp.md) | Used to test whether a string does not match the specified regular expression|
| [REGEXP_INSTR()](String/Regular-Expressions/regexp-instr.md) | Returns the starting position of the matching regular expression pattern in the string. |
| [REGEXP_LIKE()](String/Regular-Expressions/regexp-like.md) | Used to determine whether the specified string matches the provided regular expression pattern|
| [REGEXP_REPLACE()](String/Regular-Expressions/regexp-replace.md) | Used to replace the string matching the given regular expression pattern with the specified new string|
| [REGEXP_SUBSTR()](String/Regular-Expressions/regexp-substr.md) | Used to return substrings in string parameters that match regular expression parameters|

## Vector class functions

| Function Name | Function |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| [Basic Operator](Vector/arithmetic.md) | Addition (+), subtraction (-), multiplication (*) and division (/) of vectors || [SQRT()](Vector/misc.md) | Used to calculate the square root of each element in a vector |
| [ABS()](Vector/misc.md) | Used to calculate the absolute value of a vector |
| [CAST()](Vector/misc.md) | Used to explicitly convert a vector from one vector type to another vector type|
| [SUMMATION()](Vector/misc.md) | Returns the sum of all elements in the vector |
| [INNER_PRODUCT()](Vector/inner_product.md) | Used to calculate the inner product/dot product between two vectors|
| [CLUSTER_CENTERS()](Vector/cluster_centers.md) | K cluster centers used to determine vector columns |
| [COSINE_DISTANCE()](Vector/cosine_distance.md) | Used to calculate the cosine distance of two vectors. |
| [COSINE_SIMILARITY()](Vector/cosine_similarity.md) | Measures the cosine value of the angle between two vectors, and their similarity is expressed by their proximity in multidimensional space|
| [L2_DISTANCE()](Vector/l2_distance.md) | Used to calculate the Euclidean distance between two vectors|
| [L1_NORM()](Vector/l1_norm.md) | Used to calculate l1/Manhattan/TaxiCab norm|
| [L2_NORM()](Vector/l2_norm.md) | Used to calculate l2/Euclidean norm|
| [NORMALIZE_L2()](Vector/normalize_l2.md) | Used to perform Euclid normalization |
| [SUBVECTOR()](Vector/subvector.md) | Used to extract subvectors from vectors |
| [VECTOR_DIMS()](Vector/vector_dims.md) | Used to determine the dimension of a vector|

## Table function

| Function Name | Function |
| -----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| [GENERATE_SERIES()](Table/generate_series.md) | Used to form a sequence from the start value to the end value|
| [UNNEST()](Table/unnest.md) | Used to expand columns or parameters of array type within JSON type data into a table |

## Window Function

| Function Name | Function |
| -------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| [DENSE_RANK()](Window-Functions/dense_rank.md) | Provide a unique ranking for each row in the dataset |
| [RANK()](Window-Functions/rank.md) | Provide a unique ranking for each row in the dataset |
| [ROW_UNMBER()](Window-Functions/row_number.md) | Provide a unique sequence number for each row in the dataset |

## JSON Function

| Function Name | Function |
| ------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| [JQ()](Json/jq.md) | Used to parse and convert JSON data based on jq expressions |
| [JSON_EXTRACT()](Json/json_extract.md) | Return data from JSON document |
| [JSON_EXTRACT_FLOAT64()](Json/json_extract_float64.md) | Extract the value of the specified path from JSON data|
| [JSON_EXTRACT_STRING()](Json/json_extract_string.md) | Extract the value of the string of the specified path from JSON data|
| [JSON_QUOTE()](Json/json_quote.md) | Quoting JSON Documentation |
| [JSON_ROW()](Json/json_row.md) | Used to convert each row into a json array|
| [JSON_UNQUOTE()](Json/json_unquote.md) | Dereference JSON Documentation |
| [TRY_JQ()](Json/try_jq.md) | Used to parse and convert JSON data based on jq expressions and provide fault tolerance mechanisms |

## System operation and maintenance functions

| Function Name | Function |
| ------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| [CURRENT_ROLE_NAME()](system-ops/current_role_name.md) | Used to query the name of the role owned by the currently logged in user. |
| [CURRENT_ROLE()](system-ops/current_role.md) | Returns the role of the current session. |
| [CURRENT_USER_NAME()](system-ops/current_user_name.md) | Used to query the user name you are currently logged in. |
| [CURRENT_USER()](system-ops/current_user.md) | Return to the current user account|
| [PURGE_LOG()](system-ops/purge_log.md) | Used to delete logs recorded in MatrixOne database system tables. |

## Other functions

| Function Name | Function |
| ----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| [LOAD_FILE()](Other/load_file.md) | Used to read the contents of the datalink type pointing to the file|
| [SAVE_FILE()](Other/save_file.md) | Used to save the contents of the datalink type pointing to the file|
| [SAMPLE()](Other/sample.md) | Mainly used to quickly reduce query scope|
| [SERIAL_EXTRACT()](Other/serial_extract.md) | Used to extract individual elements in sequence/tuple values |
| [SLEEP()](Other/sleep.md) | Pause (sleep) the specified number of seconds for the current query|
| [STAGE_LIST()](Other/stage_list.md) | Used to view directories and files in stage|
| [UUID()](Other/uuid.md) | Return to generate internationally universal unique identifier based on RFC 4122 |
