Skip to main content
The SQL editor is the most precise way to build an audience, because it can reach on-chain and messaging data the rule builder can’t. Any query result can be saved as a segment and reused in a campaign or automation.

Steps

1

Write and run the query

Build the cohort in the SQL editor. Start from a starter query if one is close.
2

Include a wallet column

The result must contain a wallet column named wallet_address, wallet, or address. Saving fails without one, because a segment needs someone to target.
3

Save as a segment

Name it and save. It’s now available anywhere a segment is.
4

Use it downstream

Feed it into a campaign or an automation.

Checks before saving

  • Deduplicate. Joining a per-wallet table to a per-chain or per-token table fans out rows. Aggregate or filter first so a wallet appears once.
  • Confirm the identity type. A query returning contacts is different from one returning raw wallet rows; make sure it’s the audience you mean.
  • Spot-check. Read a few rows against wallets you recognize before wiring the segment into a live send.