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

# Segments From Queries

> Turn validated SQL results into reusable audience segments.

## Steps

1. Run and validate the SQL result.
2. Confirm the output maps cleanly to users or wallets.
3. Save the result as a segment.
4. Reuse the segment in a campaign or automation.

## Important Checks

* Check for duplicate rows before saving.
* Confirm the query returns the right identity type.
* Decide whether the segment needs to refresh automatically.
