> ## Documentation Index
> Fetch the complete documentation index at: https://developer.affinity.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Subdomain

> How subdomain identifies your Affinity instance

Every table in the Data Share includes a `subdomain` column as its first column, identifying
which Affinity organization instance a record belongs to.

## Multiple instances

If your share includes data from multiple Affinity instances, use it to filter or group by organization:

```sql theme={null}
-- Filter to a specific instance
SELECT *
FROM persons
WHERE subdomain = 'your-org';

-- Aggregate across instances
SELECT subdomain, COUNT(*) AS person_count
FROM persons
GROUP BY subdomain;
```

## Single instance

If your share contains data from a single Affinity instance, the column will have a constant
value across all rows. You can safely ignore it in queries, but it is always present for consistency.

<Note>
  Contact your Affinity administrator if you are unsure which value maps to your organization.
</Note>
