---
schema_version: "1"
id: b694f97729cd12164e9c728386706cbbcf319bb42eb4c2c5794237700dc6f745
title: unique()
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-unq.md
canonical_url: https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-fn-agg-unq.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 9c9adedb4b19bbf847b24088e3742fce29585a7f171dbd60607a28465bb43271
products:
  - Analytics SAQL Developer Guide
  - analytics
---

# unique()

Returns the count of unique values.

## Example - Count the Number of Industries

Use `unique()` to count the number of different industries that you have opportunities with.

```nolang
q = load "DTC_Opportunity_SAMPLE";
q = group q by all;
q = foreach q generate unique('Industry') as 'unique_Industry';
```
