Skip to content
OnchainQueries

OQ — S10 · For analysts & researchers

You already know how to write the query. What you do not want is to write an indexer first. 37 Solana programs are already decoded into 1,074 typed tables with the program's own field names.

Programs
37
Tables
1,074
Setup time
0
Credits / mo
50,000
OQ — S10·3Example

Hourly buy and sell flow for a launchpad, parameterised on the window.

flow.sql
SELECT  date_trunc('hour', ts) AS hour,  count_if(is_buy) AS buys,  count_if(NOT is_buy) AS sells,  sum(sol_amount) AS sol_volumeFROM pump_fun_solana.pump_fun_evt_trade_eventWHERE ts >= {{start_time}}GROUP BY hourORDER BY hour;
OQ — S10·4Questions

Do I need to know the engine underneath?

No. You write OnchainQL and OnchainQueries translates the forms it supports. Some edge-case behaviour follows the execution layer rather than the spec you are used to, which the SQL contract documents explicitly.

Can I port my existing analytical queries?

The core analytical surface ports directly. Do it incrementally — verify the table coverage first, then add functions, joins and windows one at a time, because anything unsupported fails with the feature named.

What if the table I need is not there?

Check the dataset catalog first — there are more tables than most people expect, including instruction tables. If a program is genuinely missing, it can usually be decoded from its IDL.

Fourteen days on Pro. 50,000 credits a month — five terabytes scanned.