A concise list of functions available in Apache AGE: Part 2
Tags: apacheage, postgres
Published: 2023-04-28 18:13:10

## INTRODUCTION
The aim of this blog post is to give a clear cut, concise and short list of all the functions available in Apache AGE. The list is already available in more details in the software documentation, however, this saves you from reading through pages of documentation searching for the relevant function.

This is part 2 of this blog post.

In this blog post, we cover logarithmic, trigonometric, string, and, aggregate function.

Read more about apache age here: https://age.apache.org/
Github here: https://github.com/apache/age/

## Logarithmic Functions
Mathematical logarithmic functions: -
- e() - Returns the base of the natural logarithm.
- sqrt(expression) - Returns the square root of a number.
- exp(expression) - Returns e^n of a number.
- log(expression) - Returns the natural log of a number.
- log10(expression) - Returns the log 10 of a number.

## Trigonometric Functions
- degrees(expression) - Converts radians to degrees.
- radians(expression) - Converts degrees to radians
- pi() - Returns the mathematical constant pi.
- sin(expression) - Returns the sin of an angle provided in radians.
- cos(expression) - Returns the cos of an angle provided in radians.
- tan(expression) - Returns the tan of an angle provided in radians.
- asin(expression) - Returns the arc sin of a value.
- acos(expression) - Returns the arc cos of a value.
- atan(expression) - Returns the arc tan of a value.
- atan2(expression1, expression2) - Returns the arctan of a set of coordinates in radians.

## String Functions
- replace(original, search, replace) - Returns a string in which all occurrences of a specified string in the original string have been replaced by another (specified) string.
- split(original, split_delimiter) - Returns a list of strings resulting from the splitting of the original string around matches of the given delimiter.
- left(original, length) - Returns a string containing the specified number of leftmost characters of the original string.
- right(original, length) - Returns a string containing the specified number of rightmost characters of the original string.
- substring(original, start [, length]) - returns a substring of the original string, beginning with a 0-based index start and length (length can be omitted).
- rTrim(original) - Returns the original string with trailing whitespaces removed.
- lTrim(original) - Returns the original string with leading whispaces removed.
- trim(original) - Returns the original string with leading and trailing whitespaces removed.
- toLower(original) - Returns the original string in lower case.
- toUpper(original) - Returns the original string in upper case.
- reverse(original) - Returns the original string in reverse character order.
- toString(expression) - Converts an integer, float, or boolean value to a string.

## Aggregation Functions
- min(expression) - Returns the minimum value in a set of values.
- max(expression) - Returns the maximum value in a set of values.
- stDev(expression) - Returns the standard deviation for the given value over a group.
- stDevP(expression) - Returns the standard deviation for the given value over a group.
- percentileCont - Returns the percentile of the given value over a group, with a percentile from 0.0 to 1.0.
- percentileDisc - Returns the percentile of the given value over a group, with a percentile from 0.0to 1.0.
- count(expression) - Returns the number of values or records.
- avg(expression) - Returns the average of a set of numeric values.
- sum(expression) - Returns the sum of a set of numeric values.

Thank you for reading.
Cheers!