# SUM

The SUM function calculates the total of a numeric expression.

## Syntax

`SUM(number)`

### Parameters

#### number

The numeric expression to be summed. Inline functions can be used within this parameter.

## Examples

Calculates the total sum of all values in the `languages` column from the `employees` data.
```esql
FROM employees
| STATS SUM(languages)
```

Calculates the sum of each employee’s maximum salary change by first finding the maximum value in the `salary_change` array for each employee, then summing those maximums across all employees.
```esql
FROM employees
| STATS total_salary_changes = SUM(MV_MAX(salary_change))
```