Skip to main content
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:
-- 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.
Contact your Affinity administrator if you are unsure which value maps to your organization.