﻿---
title: ES|QL MV_SUM function
description: 
url: https://www.elastic.co/elastic/docs-builder/docs/2988/reference/query-languages/esql/functions-operators/mv-functions/mv_sum
products:
  - Elasticsearch
---

# ES|QL MV_SUM function
## Syntax

![Embedded](https://www.elastic.co/elastic/docs-builder/docs/2988/reference/query-languages/esql/images/functions/mv_sum.svg)


## Parameters

<definitions>
  <definition term="number">
    Expression that can be null, a single value, or multiple values.
  </definition>
</definitions>


## Description

Converts a multivalued field into a single valued field containing the sum of all of the values.

## Supported types


| number        | result        |
|---------------|---------------|
| double        | double        |
| integer       | integer       |
| long          | long          |
| unsigned_long | unsigned_long |


## Example

```esql
ROW a=[3, 5, 6]
| EVAL sum_a = MV_SUM(a)
```


| a:integer | sum_a:integer |
|-----------|---------------|
| [3, 5, 6] | 14            |