# Sum

### **Description**‌

The Sum function returns the summarized value of the specified table column.

### **Syntax**

‌The syntax for the Sum function is:

`Sum(table.column)`

#### ‌**Parameters**

table.column - the table column which is to be summarized.

### **Returns**

‌The Sum function returns a number.

### **Example**‌

Let's look at some Sum function examples and explore how to use the Sum function.‌

<div align="left"><img src="https://529897662-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LtPTgZOYmpJka4jqs1v%2F-MZrkHmn5o7bN8xIgia_%2F-MZrlWRz8ePn94npDDYl%2Fquantity.jpg?alt=media&#x26;token=9038e804-957e-476d-8bd9-0eb8cc938279" alt="Example table: orderQuantity"></div>

```
sum(orderQuantity.Quantity)
Result: 27

Sum([col: "4"] & [col: "7"])
Result: 11

let projectedProfit = sum((orders where isConfirmed).value) - sum(expenses.cost);
```
