---
schema_version: "1"
id: 33800329691455305a17358c91da027f186fb8cda3734cada7bee715c999a94a
title: sum()
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/analytics/bi_dev_guide_saql/guides/concept/bi-saql-fn-agg-sum.md
canonical_url: https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-fn-agg-sum.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: eed61b26146d8e7e66a6215ee235804d4851ebadf704948a71a0f2879339c1bb
products:
  - Analytics SAQL Developer Guide
  - analytics
---

# sum()

Returns the sum of a numeric field.

## Example - Calculate the Total Meeting Time

Suppose that you have a database of meeting information. Use `sum()` to see that the total time spent meeting with each account.

```nolang
q = load "Meetings";
q = group q by 'Company';
q = foreach q generate 'Company' as 'Company', sum('MeetingDuration') as 'sum_meetings';

```
