Skip to main content
Formo’s data warehouse gives you direct SQL access to events, users, sessions, revenue, and wallet profiles across chains.
  • Events, Users, Sessions, Revenue, and Sources are first-party data scoped to your project.
  • Wallet Profiles include public onchain data (net worth, apps, tokens, chains, social profiles, etc.) and are globally accessible across all workspaces.
Data catalog
Key details:
  • SQL dialect: ClickHouse SQL (not standard SQL)
  • Default row limit: 100 rows (add your own LIMIT clause to override)
  • Project scoping: All queries are automatically filtered to your project — you never need to add WHERE project_id = ...
  • Aggregate tables: Several tables use ClickHouse AggregateFunction types that require -Merge suffix functions (see Working with Aggregate Tables)
Query data with the Query API and Profiles API, explore with the BI integration, export with Data Sync, or write SQL directly in the Explorer.

Data flow

raw_events (landing zone)


events (deduplicated + parsed)

    ├──▶ users (wallet-identified profiles)
    ├──▶ anonymous_users (pre-wallet profiles)
    ├──▶ sessions (session-level engagement)
    ├──▶ sources (traffic attribution)
    ├──▶ revenue (financial metrics)
    └──▶ identities (anonymous ↔ wallet mapping)

wallet_profiles_events (blockchain data)

    ├──▶ wallet_profiles_mv (global wallet profiles)
    ├──▶ wallet_profiles_chains_mv (per-chain data)
    ├──▶ wallet_profiles_chains_tokens_mv (token holdings)
    └──▶ wallet_profiles_chains_apps_mv (DeFi app usage)

Tables

events

The core event log. Contains all user interaction events — page views, custom events, wallet connects, and onchain contract events (decoded_log). Use cases: Event-level analysis, user journey tracking, custom event queries, debugging
ColumnTypeDescription
session_idStringUser session identifier
channelStringEvent channel
typeStringEvent category: page, track, identify, connect, decoded_log
anonymous_idStringAuto-generated anonymous user ID
user_idStringOptional user identifier
addressStringWallet address (empty if not connected)
eventStringSpecific event name for track events
contextStringJSON metadata: user_agent, page info, referrer. See contextual fields
propertiesStringJSON with event-specific custom properties. See event spec
versionStringSDK version
timestampDateTimeEvent timestamp
message_idStringUnique event ID for deduplication
originStringDomain (without www)
localeStringUser locale
locationStringCountry code (e.g., US, DE)
timezoneStringUser timezone
page_pathStringURL path
page_titleStringPage title
page_urlStringFull page URL
page_queryStringURL query string
page_hashStringURL hash fragment
library_nameStringSDK library name
library_versionStringSDK library version
referrer_urlStringFull referrer URL
referrerStringReferrer domain (without www)
refStringRef parameter
utm_sourceStringUTM source
utm_mediumStringUTM medium
utm_campaignStringUTM campaign
utm_termStringUTM term
utm_contentStringUTM content
user_agentStringRaw user agent string
deviceStringDevice type: desktop, mobile-ios, mobile-android, tablet, bot
browserStringBrowser: chrome, safari, firefox, or Web3 wallets
osStringOS: windows, ios, android, macos, linux
Example:
SELECT *
FROM events
ORDER BY timestamp DESC
LIMIT 10

users

Aggregated wallet user profiles with attribution, engagement, and revenue metrics. Each row represents one wallet address. Use cases: User segmentation, attribution analysis, lifecycle tracking, wallet analytics
This is an aggregate table. Most columns require -Merge functions. Always GROUP BY address. Never use SELECT *. See Working with Aggregate Tables.
ColumnTypeQuery Function
addressStringDirect access
first_seenSimpleAggregateFunction(min, DateTime)min(first_seen)
last_seenSimpleAggregateFunction(max, DateTime)max(last_seen)
first_utm_sourceAggregateFunction(argMin, String, DateTime)argMinMerge(first_utm_source)
last_utm_sourceAggregateFunction(argMax, String, DateTime)argMaxMerge(last_utm_source)
first_utm_mediumAggregateFunction(argMin, String, DateTime)argMinMerge(first_utm_medium)
last_utm_mediumAggregateFunction(argMax, String, DateTime)argMaxMerge(last_utm_medium)
first_utm_campaignAggregateFunction(argMin, String, DateTime)argMinMerge(first_utm_campaign)
last_utm_campaignAggregateFunction(argMax, String, DateTime)argMaxMerge(last_utm_campaign)
first_utm_contentAggregateFunction(argMin, String, DateTime)argMinMerge(first_utm_content)
last_utm_contentAggregateFunction(argMax, String, DateTime)argMaxMerge(last_utm_content)
first_utm_termAggregateFunction(argMin, String, DateTime)argMinMerge(first_utm_term)
last_utm_termAggregateFunction(argMax, String, DateTime)argMaxMerge(last_utm_term)
first_referrerAggregateFunction(argMin, String, DateTime)argMinMerge(first_referrer)
last_referrerAggregateFunction(argMax, String, DateTime)argMaxMerge(last_referrer)
first_referrer_urlAggregateFunction(argMin, String, DateTime)argMinMerge(first_referrer_url)
last_referrer_urlAggregateFunction(argMax, String, DateTime)argMaxMerge(last_referrer_url)
first_refAggregateFunction(argMin, String, DateTime)argMinMerge(first_ref)
last_refAggregateFunction(argMax, String, DateTime)argMaxMerge(last_ref)
num_sessionsAggregateFunction(uniq, String)uniqMerge(num_sessions)
revenueSimpleAggregateFunction(sum, Float64)sum(revenue)
volumeSimpleAggregateFunction(sum, Float64)sum(volume)
pointsSimpleAggregateFunction(sum, Float64)sum(points)
wallets_stateAggregateFunction(groupUniqArray, String)groupUniqArrayMerge(wallets_state)
last_typeAggregateFunction(argMax, String, DateTime)argMaxMerge(last_type)
last_eventAggregateFunction(argMax, String, DateTime)argMaxMerge(last_event)
last_propertiesAggregateFunction(argMax, String, DateTime)argMaxMerge(last_properties)
locationAggregateFunction(argMax, String, DateTime)argMaxMerge(location)
deviceAggregateFunction(argMax, String, DateTime)argMaxMerge(device)
browserAggregateFunction(argMax, String, DateTime)argMaxMerge(browser)
osAggregateFunction(argMax, String, DateTime)argMaxMerge(os)
activity_datesAggregateFunction(groupUniqArray, Date)groupUniqArrayMerge(activity_dates)
Lifecycle definitions (based on activity_dates):
  • New: first_seen within 30 days
  • Churned: last_seen >= 30 days ago
  • Power: 5+ unique active days in last 30 days
  • Resurrected: had 30+ day gap but returned
  • Returning: default
Example:
SELECT
    address,
    min(first_seen) AS first_seen,
    max(last_seen) AS last_seen,
    argMinMerge(first_utm_source) AS first_utm_source,
    argMaxMerge(last_utm_source) AS last_utm_source,
    uniqMerge(num_sessions) AS num_sessions,
    sum(revenue) AS revenue,
    sum(volume) AS volume,
    argMaxMerge(location) AS location,
    argMaxMerge(device) AS device,
    argMaxMerge(browser) AS browser
FROM users
GROUP BY address
LIMIT 10

anonymous_users

Profiles for users who haven’t connected a wallet yet. Same structure as users but keyed by anonymous_id instead of address. Use cases: Pre-wallet user analysis, conversion funnel tracking, anonymous visitor segmentation
Total users = users (wallet-connected) + anonymous_users (pre-wallet)
ColumnTypeQuery Function
anonymous_idStringDirect access
All other columns are identical to the users table, with anonymous_id replacing address as the primary key.

sessions

Aggregated session data with engagement metrics and attribution. Each row represents one session on a given date. Use cases: Session analysis, bounce rate calculations, session duration, user attribution
ColumnTypeQuery Function
originStringDirect access
session_idStringDirect access
dateDateDirect access
deviceSimpleAggregateFunction(any, String)Direct access
browserSimpleAggregateFunction(any, String)Direct access
osSimpleAggregateFunction(any, String)Direct access
locationSimpleAggregateFunction(any, String)Direct access
referrerSimpleAggregateFunction(any, String)Direct access
refSimpleAggregateFunction(any, String)Direct access
utm_mediumSimpleAggregateFunction(any, String)Direct access
utm_sourceSimpleAggregateFunction(any, String)Direct access
utm_campaignSimpleAggregateFunction(any, String)Direct access
utm_contentSimpleAggregateFunction(any, String)Direct access
utm_termSimpleAggregateFunction(any, String)Direct access
first_hitSimpleAggregateFunction(min, DateTime)Direct access
latest_hitSimpleAggregateFunction(max, DateTime)Direct access
hitsAggregateFunction(count)countMerge(hits)
Example:
SELECT AVG(latest_hit - first_hit) AS avg_session_length
FROM sessions

sources

Daily aggregated traffic source metrics and attribution data. Each row represents one day of activity from a specific referrer/UTM combination. Use cases: Marketing attribution, referrer performance, traffic source analysis, campaign ROI
ColumnTypeDescription
dateDateActivity date
originStringSite domain
referrerStringReferrer domain
referrer_urlStringFull referrer URL
deviceStringDevice type
browserStringBrowser
osStringOperating system
locationStringCountry code
refStringRef parameter
utm_mediumStringUTM medium
utm_sourceStringUTM source
utm_campaignStringUTM campaign
utm_contentStringUTM content
utm_termStringUTM term
visitsAggregateFunction(uniq, String)Unique sessions — use uniqMerge(visits)
usersAggregateFunction(uniq, String)Unique anonymous users — use uniqMerge(users)
hitsAggregateFunction(count)Page views — use countMerge(hits)

revenue

Financial metrics with full attribution context. Tracks revenue, transaction volume, and points. Use cases: Revenue attribution, ROI analysis, financial performance by source/campaign
ColumnTypeDescription
originStringSite domain
pathnameStringPage path
dateDateTransaction date
deviceStringDevice type
browserStringBrowser
osStringOperating system
locationStringCountry code
referrer_urlStringFull referrer URL
referrerStringReferrer domain
refStringRef parameter
utm_mediumStringUTM medium
utm_sourceStringUTM source
utm_campaignStringUTM campaign
utm_contentStringUTM content
utm_termStringUTM term
eventStringRevenue-generating event name
rdnsStringWallet RDNS identifier
provider_nameStringWallet provider name
chain_idStringBlockchain chain ID
volumeFloat32Transaction volume (capped at 1B)
revenueFloat32Revenue value (capped at 1B)
pointsFloat32Points value (capped at 1B)
Example:
SELECT utm_campaign, SUM(revenue) AS total_revenue
FROM revenue
GROUP BY utm_campaign
ORDER BY total_revenue DESC

identities

Identity graph linking anonymous sessions to wallet addresses. Each row represents a connection between an anonymous user and a wallet. Use cases: Conversion tracking, user journey analysis, linking pre/post-wallet activity
ColumnTypeQuery Function
session_idStringDirect access
anonymous_idStringDirect access
addressStringWallet address
user_idStringOptional user identifier
first_seenAggregateFunction(min, DateTime)minMerge(first_seen)
Example:
SELECT
    address,
    anonymous_id,
    session_id,
    minMerge(first_seen) AS connected_at
FROM identities
GROUP BY address, anonymous_id, session_id
ORDER BY connected_at DESC
LIMIT 20

wallet_profiles_mv

Global wallet profile data aggregated across all chains. One row per wallet address with social profiles, contact info, and net worth. Use cases: Wallet intelligence, social identity resolution, user enrichment, outreach
ColumnTypeQuery Function
addressStringDirect access
net_worth_usdAggregateFunction(argMax, Float64, DateTime)argMaxMerge(net_worth_usd)
ensSimpleAggregateFunction(max, String)Direct access
farcasterSimpleAggregateFunction(max, String)Direct access
lensSimpleAggregateFunction(max, String)Direct access
basenamesSimpleAggregateFunction(max, String)Direct access
lineaSimpleAggregateFunction(max, String)Direct access
discordSimpleAggregateFunction(max, String)Direct access
telegramSimpleAggregateFunction(max, String)Direct access
websiteSimpleAggregateFunction(max, String)Direct access
githubSimpleAggregateFunction(max, String)Direct access
twitterSimpleAggregateFunction(max, String)Direct access
linkedinSimpleAggregateFunction(max, String)Direct access
emailSimpleAggregateFunction(max, String)Direct access
instagramSimpleAggregateFunction(max, String)Direct access
facebookSimpleAggregateFunction(max, String)Direct access
tiktokSimpleAggregateFunction(max, String)Direct access
youtubeSimpleAggregateFunction(max, String)Direct access
redditSimpleAggregateFunction(max, String)Direct access
avatarSimpleAggregateFunction(max, String)Direct access
descriptionSimpleAggregateFunction(max, String)Direct access
display_nameSimpleAggregateFunction(max, String)Direct access
locationSimpleAggregateFunction(max, String)Direct access
updated_atSimpleAggregateFunction(max, DateTime)Direct access

wallet_profiles_chains_mv

Wallet profile data broken down by blockchain network. Each row represents a wallet’s activity on a specific chain. Use cases: Chain-specific analysis, cross-chain behavior tracking, multi-chain user segmentation
ColumnTypeQuery Function
addressStringDirect access
chain_idStringBlockchain identifier
net_worth_usdAggregateFunction(argMax, Float64, DateTime)argMaxMerge(net_worth_usd)
tx_countAggregateFunction(argMax, UInt64, DateTime)argMaxMerge(tx_count)
first_onchainSimpleAggregateFunction(min, Nullable(DateTime))Direct access
last_onchainSimpleAggregateFunction(max, Nullable(DateTime))Direct access
updated_atSimpleAggregateFunction(max, DateTime)Direct access
Example:
SELECT
    address,
    chain_id,
    argMaxMerge(net_worth_usd) AS net_worth_usd,
    argMaxMerge(tx_count) AS tx_count,
    first_onchain,
    last_onchain
FROM wallet_profiles_chains_mv
GROUP BY address, chain_id, first_onchain, last_onchain
ORDER BY net_worth_usd DESC
LIMIT 50

wallet_profiles_chains_tokens_mv

Token holdings data per wallet per chain. Each row represents one token held by a wallet on a specific chain. Use cases: Token portfolio analysis, token-based segmentation, whale identification
ColumnTypeQuery Function
addressStringDirect access
chain_idStringBlockchain identifier
token_addressStringToken contract address
app_idStringDeFi app ID (if token is in a protocol)
nameAggregateFunction(argMax, String, DateTime)argMaxMerge(name)
symbolAggregateFunction(argMax, String, DateTime)argMaxMerge(symbol)
imgAggregateFunction(argMax, String, DateTime)argMaxMerge(img)
decimalsAggregateFunction(argMax, Float64, DateTime)argMaxMerge(decimals)
priceAggregateFunction(argMax, Float64, DateTime)argMaxMerge(price)
balanceAggregateFunction(argMax, Float64, DateTime)argMaxMerge(balance)
balance_usdAggregateFunction(argMax, Float64, DateTime)argMaxMerge(balance_usd)
updated_atSimpleAggregateFunction(max, DateTime)Direct access

wallet_profiles_chains_apps_mv

DeFi app usage data per wallet per chain. Each row represents a wallet’s interaction with a specific DeFi protocol. Use cases: DeFi app adoption analysis, protocol usage tracking, user portfolio analysis
ColumnTypeQuery Function
addressStringDirect access
chain_idStringBlockchain identifier
idStringUnique app identifier
nameAggregateFunction(argMax, String, DateTime)argMaxMerge(name)
imgAggregateFunction(argMax, String, DateTime)argMaxMerge(img)
urlAggregateFunction(argMax, String, DateTime)argMaxMerge(url)
balance_usdAggregateFunction(argMax, Float64, DateTime)argMaxMerge(balance_usd)
updated_atSimpleAggregateFunction(max, DateTime)Direct access

wallet_profiles_events

Raw timestamped wallet profile data from blockchain analysis. Contains the unprocessed profile updates that feed into the wallet_profiles_* materialized views. Use cases: Debugging wallet profile data, historical profile snapshots, raw data access
ColumnTypeDescription
addressStringWallet address
typeStringEvent type: wallet_profile_set or wallet_profile_chain_set
chain_idStringBlockchain identifier
versionStringProfile data version
propertiesStringJSON with detailed profile data (tokens, balances, tx history)
timestampDateTimeWhen the profile was captured

chains

Derived view providing chain usage data with attribution context. Use cases: Chain adoption tracking, multi-chain user analysis
ColumnTypeDescription
chain_idStringBlockchain identifier
dateDateTimeActivity date
originStringSite domain
deviceStringDevice type
browserStringBrowser
osStringOperating system
locationStringCountry code
referrerStringReferrer domain
refStringRef parameter
utm_mediumStringUTM medium
utm_sourceStringUTM source
utm_campaignStringUTM campaign
utm_contentStringUTM content
utm_termStringUTM term
visitsStringVisit count

pages

Derived view providing page-level analytics data. Use cases: Page performance analysis, content analytics, top pages
ColumnTypeDescription
originStringSite domain
pathnameStringURL path
visitsNumberUnique session count
hitsNumberTotal page views

Table relationships

events.anonymous_id  ──────▶  anonymous_users.anonymous_id
events.address       ──────▶  users.address
events.session_id    ──────▶  sessions.session_id
                               identities.session_id

identities.anonymous_id ───▶  anonymous_users.anonymous_id
identities.address     ────▶  users.address

users.address          ────▶  wallet_profiles_mv.address
                               wallet_profiles_chains_mv.address
                               wallet_profiles_chains_tokens_mv.address
                               wallet_profiles_chains_apps_mv.address
The identities table is the bridge between anonymous and identified users. It links anonymous_id and session_id to address, enabling you to track user behavior before and after wallet connection.

Functions

Custom SQL functions that resolve at query time. Functions use the {{ function_name(...) }} syntax — the macro is expanded into a numeric literal before your query runs, so results can be used anywhere a number would be (SELECT, WHERE, arithmetic, etc.). Rules:
  • Maximum 10 function calls per query
  • Results are cached for 15 minutes

Price oracle functions

Fetch live token prices directly inside your SQL queries. Use these to convert token amounts to USD values without joining external price data manually.

alchemy.token_price

Get token price by contract address and chain ID from Alchemy. Signature: {{ alchemy.token_price('ADDRESS', CHAIN_ID, 'CURRENCY') }} Parameters:
  • ADDRESS — EVM contract address (0x-prefixed, 42 characters)
  • CHAIN_ID — Numeric chain ID (e.g., 1 for Ethereum, 8453 for Base, 42161 for Arbitrum)
  • CURRENCY — One of usd, eur, eth, btc
Example:
SELECT
    SUM(volume) * {{ alchemy.token_price('0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', 1, 'usd') }} AS volume_usd
FROM revenue
See the Alchemy Prices API — Get Token Prices by Address reference.

alchemy.token_price_by_symbol

Get token price by symbol from Alchemy. Signature: {{ alchemy.token_price_by_symbol('SYMBOL', 'CURRENCY') }} Parameters:
  • SYMBOL — Token symbol (e.g., ETH, BTC, SOL)
  • CURRENCY — One of usd, eur, eth, btc
Example:
SELECT
    SUM(revenue) * {{ alchemy.token_price_by_symbol('ETH', 'usd') }} AS revenue_usd
FROM revenue
See the Alchemy Prices API — Get Token Prices by Symbol reference.

pyth.token_price

Get token price by pair name from Pyth. Signature: {{ pyth.token_price('BASE/QUOTE') }} Parameters:
  • BASE/QUOTE — Price pair (e.g., ETH/USD, BTC/USD, SOL/USD)
Example:
SELECT
    SUM(revenue) * {{ pyth.token_price('ETH/USD') }} AS revenue_usd
FROM revenue
See the Pyth Hermes API — Latest Price Updates reference.

Variables

Template variables are replaced with actual values at query time. Use them to build charts and dashboards that respond to a shared date picker instead of hardcoded ranges.

Date range variables

{{date_from}}

Start date of the selected date range. Replaced with a YYYY-MM-DD string at query time. Example:
WHERE timestamp >= '{{date_from}}'

{{date_to}}

End date of the selected date range. Replaced with a YYYY-MM-DD string at query time. Example:
WHERE timestamp < '{{date_to}}'
Combined example:
SELECT
    toDate(timestamp) AS date,
    COUNT(*) AS events
FROM events
WHERE timestamp >= '{{date_from}}' AND timestamp < '{{date_to}}'
GROUP BY date
ORDER BY date

Working with aggregate tables

Several tables (users, anonymous_users, sessions, sources, identities) use ClickHouse AggregateFunction types. These store intermediate aggregation states, not final values.

Rules

  1. Always GROUP BY the primary key when querying aggregate tables
  2. Use -Merge suffix for AggregateFunction columns (e.g., argMaxMerge(last_utm_source))
  3. Use standard functions for SimpleAggregateFunction columns (e.g., min(first_seen), max(last_seen))
  4. Never SELECT * on aggregate tables — it returns binary aggregate states, not readable values

Quick reference

Aggregate TypeQuery PatternExample
AggregateFunction(argMax, T, DateTime)argMaxMerge(col)argMaxMerge(location)
AggregateFunction(argMin, T, DateTime)argMinMerge(col)argMinMerge(first_utm_source)
AggregateFunction(uniq, T)uniqMerge(col)uniqMerge(num_sessions)
AggregateFunction(count)countMerge(col)countMerge(hits)
AggregateFunction(groupUniqArray, T)groupUniqArrayMerge(col)groupUniqArrayMerge(wallets_state)
AggregateFunction(min, T)minMerge(col)minMerge(first_seen)
SimpleAggregateFunction(min, T)min(col)min(first_seen)
SimpleAggregateFunction(max, T)max(col)max(last_seen)
SimpleAggregateFunction(sum, T)sum(col)sum(revenue)
SimpleAggregateFunction(any, T)Direct accessdevice

Example queries

Most active wallets

SELECT address, COUNT(*) AS event_count
FROM events
WHERE address != ‘’
GROUP BY address
ORDER BY event_count DESC
LIMIT 10

Daily active users

SELECT
    toDate(timestamp) AS date,
    COUNT(DISTINCT address) AS daily_active_users
FROM events
WHERE timestamp >= now() - INTERVAL 30 DAY
GROUP BY date
ORDER BY date DESC

Average session duration

SELECT AVG(latest_hit - first_hit) AS avg_session_length
FROM sessions

Events by type

SELECT type, COUNT(*) AS event_count
FROM events
GROUP BY type
ORDER BY event_count DESC

Revenue by UTM campaign

SELECT utm_campaign, SUM(revenue) AS total_revenue
FROM revenue
GROUP BY utm_campaign
ORDER BY total_revenue DESC

Top countries by session count

SELECT location, COUNT(*) AS session_count
FROM sessions
GROUP BY location
ORDER BY session_count DESC
LIMIT 20

Sessions by device and browser

WITH top_browsers AS (
    SELECT browser
    FROM sessions
    GROUP BY browser
    ORDER BY COUNT(*) DESC
    LIMIT 10
)
SELECT device, browser, COUNT(*) AS session_count
FROM sessions
WHERE browser IN (SELECT browser FROM top_browsers)
GROUP BY device, browser
ORDER BY session_count DESC

Enrich users with social profiles

SELECT
    u.address,
    min(u.first_seen) AS first_seen,
    max(u.last_seen) AS last_seen,
    argMaxMerge(u.location) AS location,
    wp.ens,
    wp.farcaster,
    wp.twitter,
    argMaxMerge(wp.net_worth_usd) AS net_worth_usd
FROM users u
LEFT JOIN wallet_profiles_mv wp ON u.address = wp.address
GROUP BY u.address, wp.ens, wp.farcaster, wp.twitter
ORDER BY net_worth_usd DESC
LIMIT 20

Top DeFi apps of US users

WITH user_locations AS (
    SELECT
        address,
        argMaxMerge(location) AS location
    FROM users
    GROUP BY address
),
app_balances AS (
    SELECT
        id,
        chain_id,
        argMaxMerge(name) AS name,
        argMaxMerge(url) AS url,
        argMaxMerge(balance_usd) AS balance_usd,
        address
    FROM wallet_profiles_chains_apps_mv
    WHERE address IN (
        SELECT address
        FROM user_locations
        WHERE location = ‘US’
    )
    GROUP BY id, chain_id, address
)
SELECT
    id,
    chain_id,
    any(name) AS name,
    any(url) AS url,
    sum(balance_usd) AS total_balance_usd,
    count(DISTINCT address) AS user_count
FROM app_balances
GROUP BY id, chain_id
ORDER BY total_balance_usd DESC
LIMIT 20

High net worth DeFi positions

SELECT
    address,
    id,
    argMaxMerge(name) AS name,
    chain_id,
    argMaxMerge(balance_usd) AS balance_usd
FROM wallet_profiles_chains_apps_mv
GROUP BY address, chain_id, id
HAVING balance_usd > 500
ORDER BY balance_usd DESC
LIMIT 100

Track user journey across anonymous and wallet sessions

SELECT
    i.address,
    i.anonymous_id,
    i.session_id,
    minMerge(i.first_seen) AS connected_at
FROM identities i
GROUP BY i.address, i.anonymous_id, i.session_id
ORDER BY connected_at DESC
LIMIT 20

Next steps

SQL Explorer Guide

Step-by-step guide to writing queries

Ask AI

Generate SQL with natural language

BI Integration

Connect Metabase, Grafana, and more

Query API

Query data programmatically