# Unique
## Definition(s)
### Context: [[Nexus - Google Analytics Certificate Course#4.1 Google Analytics - 4 Process Module 1 - The importance of integrity|Google Analytics Certificate Course 4 - data integrity]]
#### Sub-context: [[Data Integrity]], constraint
>[! Definition]
>Values cannot have a duplicate.
### Context: [[Nexus - Google Analytics Certificate Course#5.4 Google Analytics - 5 Analyze - Module 4 - Perform data calculations Perform Data Calculations|Google Analytics Certificate Course 5]]
#### Subcontext: [[Function#Spreadsheet functions]]
>[! note] Definition
> Sheets function that returns unique rows in the provided source range, discarding duplicates. Rows are returned in the order in which they first appear in the source range.
## Examples
### Data integrity context
This is a [[mandatory]] constraint for [[Primary key]] values.
### Spreadsheets context
```excel
=UNIQUE(range)
=UNIQUE(A2:A900)
```
## Related
[[Data Integrity]]
## Resources
### Use in spreadsheets
[=UNIQUE() sheets docs](https://support.google.com/docs/answer/10522653)
[Use UNIQUE and QUERY together](https://www.owox.com/blog/articles/query-with-unique-google-sheets/)
## Flashcards
The below code are generated for use with [Spaced Repetition plugin](https://github.com/st3v3nmw/obsidian-spaced-repetition/) [docs](https://www.stephenmwangi.com/obsidian-spaced-repetition/)
Values cannot have a duplicate. @@@ [[Unique|Unique (constraint)]]
Sheets function that returns unique rows in the provided source range, discarding duplicates. Rows are returned in the order in which they first appear in the source range. @@@ [[Unique|=UNIQUE()]]