Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.formo.so/llms.txt

Use this file to discover all available pages before exploring further.

The formo query command lets you execute SQL queries against your Formo analytics data warehouse directly from the terminal.

formo query <sql>

Run a SQL query against your Formo analytics data.
Requires query:read scope on your API key.

Arguments

ArgumentTypeRequiredDescription
sqlstringSQL query string to execute

Examples

# Count all events
formo query "SELECT count(*) FROM events"

# Top 10 wallets by net worth
formo query "SELECT address, net_worth_usd FROM wallet_profiles ORDER BY net_worth_usd DESC LIMIT 10"

# Daily active users over the last 7 days
formo query "SELECT DATE(timestamp) as day, COUNT(DISTINCT address) as dau FROM events WHERE timestamp > now() - INTERVAL 7 DAY GROUP BY day ORDER BY day"

# Pipe results to jq for processing
formo query "SELECT count(*) as total FROM events" | jq '.data'

Tips

  • SQL queries execute against your project’s analytics data warehouse.
  • Wrap your query in double quotes to prevent shell interpretation.
  • Use single quotes inside your SQL for string literals.
  • Pipe the output to jq for JSON processing in scripts.