
Creating Queries
Navigate to Queries and click New Query to open the editor.
Queries created by chat are also automatically saved and appear in your
Queries dashboard.
Query Assistant
Press Cmd+B to open the chat assistant directly in the query editor. The assistant has full context of your current query and can write new queries, modify existing ones, explain results, or help debug SQL errors.Managing Queries
Navigate to Queries to see all your queries. Each query displays its name, last modified date, last run time, and author. Click any query to open it in the editor. From there you can:- Run the query to get fresh results
- Edit the SQL and it will save automatically
- Duplicate the query to create a copy
- Delete the query permanently
Using Queries in Automations
Saved queries can be added to automations as Query blocks, letting you build repeatable workflows that run on a schedule.Learn more about Automations
Build automated workflows with your saved queries
Using Variables
Variables make your queries reusable by letting you change values without editing the SQL. Add variables in the Variables panel on the right side of the editor.Variable Syntax
| Syntax | Use | Example |
|---|---|---|
{{variable}} | For values (strings, numbers, dates) | WHERE address = '{{wallet_address}}' |
{{{variable}}} | For identifiers (table names, columns) | SELECT * FROM {{{table_name}}} |
Example with Variables
wallet_address— The wallet to analyzedays_back— Number of days to look back
Autocomplete
The editor provides autocomplete suggestions as you type, including table names, column names, and SQL keywords.- Tab or Enter to accept the highlighted suggestion
- Ctrl+N to move down in the suggestion list
- Ctrl+P to move up in the suggestion list
- Ctrl+Y to select the current suggestion
Keyboard Shortcuts
| Shortcut | Action |
|---|---|
| Cmd+Enter | Run query |
| Cmd+B | Open / close chat assistant |
| Tab | Accept autocomplete suggestion |
| Ctrl+N | Next autocomplete suggestion |
| Ctrl+P | Previous autocomplete suggestion |
| Ctrl+Y | Select autocomplete suggestion |
API Access
Click the API button in the top-right corner of any query to get ready-to-use code for executing the query programmatically.
- cURL — A complete
curlcommand to execute the query via the REST API - Flipside CLI — The
flipside query runcommand with the query ID pre-filled
Writing Queries
Table References
Use the full table path:{network}.{schema}.{table}
Recommended Tables
Start withez_* (curated) tables for most analyses:
| Network | Common Tables |
|---|---|
| Ethereum | ethereum.defi.ez_dex_swaps, ethereum.core.ez_token_transfers |
| Solana | solana.defi.ez_dex_swaps, solana.nft.ez_nft_sales |
| Arbitrum | arbitrum.defi.ez_dex_swaps, arbitrum.core.ez_native_transfers |
Query Optimization
Filter by date
Filter by date
Always include date filters to limit scan size:
Use specific columns
Use specific columns
Select only needed columns instead of
SELECT *:Limit results
Limit results
Add
LIMIT during exploration:Use aggregated tables
Use aggregated tables
For high-level metrics, use pre-aggregated tables:
Example Queries
DEX Volume by Protocol
Top Token Holders
Cross-Chain Bridge Activity
Next Steps
Export Results
Download query results as CSV or JSON
Data Explorer
Browse available tables and schemas
Schema Documentation
Complete table references
Chat
Ask the assistant to write or modify queries