# Data Uniqueness

> Whether each thing is in the data just once.

**Field:** Data Engineering  
**Category:** Governance & Quality  
**Also known as:** Uniqueness (Data Quality), Duplicate Records

## Think of it like

Each child in class has one name tag. If two tags say Emma, someone gets counted twice.

## Definition

Data uniqueness is whether each real thing, such as an order or a customer, appears only once. Every order should have one row, and every customer one record. Copies creep in when a load runs twice or two systems hold the same person. A check groups rows by their key and looks for any key that appears more than once. It is one of the easiest ones to test.

## Example

A retried load adds the same 500 orders a second time. A uniqueness check on order_id catches it before the report runs.

## Example code

```sql
SELECT order_id, COUNT(*) AS copies
FROM orders
GROUP BY order_id
HAVING COUNT(*) > 1;
```

Any row this returns is an order that appears more than once.

## Why it matters

Copies make every count and total too big. Sales look higher than they were.

## Common mistake

Testing a made-up key that is new on every row. Test the real key, such as the order number.

## Three principles

- **Once per thing.** One row for each real item.
- **Check the key.** Group by the business key.
- **Easy to test.** One query finds every copy.

## Related terms

- [Data Quality Dimensions](https://learn.benibix.com/term/data/data-quality-dimensions)
- [Data Deduplication](https://learn.benibix.com/term/data/data-deduplication)
- [Idempotent Pipeline](https://learn.benibix.com/term/data/idempotent-pipeline)
- [Surrogate Key](https://learn.benibix.com/term/data/surrogate-key)

![Six tiles, one per quality dimension, each with a small broken example: accuracy shows a wrong price, completeness a blank email, consistency two totals that disagree, freshness a table last loaded 3 days ago, uniqueness an order listed twice, and validity a date of 31 February.](https://learn.benibix.com/diagrams/data-quality-dimensions.svg)

---

Source: https://learn.benibix.com/term/data/data-uniqueness
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-18
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
