Summary
You can write SQL queries spanning all blockchains offered by Allium. Query raw blockchain data for full flexibility, or leverage abstracted data models to get data you care about quickly (e.g.crosschain.dex.trades
and crosschain.stablecoin.transfers
).
Run a Query
- Go to https://app.allium.so/analyze/queries and click on New to create a new query.
-
Copy and paste the query below into the query editor:
-
Click on Run to execute the query. The results will be shown as a table:
You can switch to chart view and group by chain:
Create a Parameterized Query
If you need to run multiple very similar queries, you can do so with parameterized queries. Replace a variable or string in your query with{{param_name}}
in the query editor.
Example parameterized query:

Query on a Previous Query Result
You can use the results of a completed query run in another query. This allows you to build up more complex queries, or run additional aggregations or joins on top of data that you have already queried.-
Run a query, then on its query editor page, click on View Run History to view completed query runs:
- Click the copy button to copy the relevant run ID.
-
Use it in a new query as
query_history.<query_run_id>
. For example, if your query run ID ishoHTRjrs2MO3X64I5Rc2_20251001T080527_horde
, you can do:
If you are querying with a mix of
query_history
results and Allium’s data tables, you can only use query results that are less than 24 hours old.For queries using only query_history
results, there is no time limit.