Skip to main content

All Persons on a List

View all persons on a list called “Distribution List”:

All Persons Working at a Company Across Affinity Accounts

Find all persons associated with a given company across all subdomains:

Flattening Custom Fields into Native Columns

Pivot a company’s custom fields JSON so each field becomes its own column: A field that holds more than one value stores them as a JSON array under one key, so the query below flattens that array as well. The array is in the same order as Affinity shows the values, oldest first.
See Fields Metadata for details on the fields_metadata table.