Query editor
with treasury_flows as (-- Treasury inflows from subDAOsselectdate_trunc('month', call_block_date) as month,cast(regexp_extract(log, 'Minting ([0-9]+)', 1) as bigint) * 1e-8 as net_changefrom helium_solana.helium_sub_daos_call_issuerewardsv0,unnest(call_log_messages) as t(log)where log like 'Program log: Minting%'union all-- Treasury outflows (redeems)selectdate_trunc('month', call_block_date) as month,- cast(json_extract_scalar(args, '$.RedeemArgsV0.amount') as bigint) * 1e-8 as net_changefrom helium_solana.treasury_management_call_redeemV0),cumulative_treasury as (selectmonth,sum(net_change) over (order by monthrows between unbounded preceding and current row) as treasury_balancefrom (select month, sum(net_change) as net_changefrom treasury_flowsgroup by month)),network_flows as (-- All network mints for circulating supplyselectdate_trunc('month', call_block_date) as month,cast(regexp_extract(log, 'Minting ([0-9]+)', 1) as bigint) * 1e-8 as net_changefrom helium_solana.helium_sub_daos_call_issuerewardsv0,unnest(call_log_messages) as t(log)where log like 'Program log: Minting%'union all-- Network redemptions/burnsselectdate_trunc('month', call_block_date) as month,- cast(json_extract_scalar(args, '$.RedeemArgsV0.amount') as bigint) * 1e-8 as net_changefrom helium_solana.treasury_management_call_redeemV0),cumulative_supply as (selectmonth,sum(net_change) over (order by monthrows between unbounded preceding and current row) as circulating_supplyfrom (select month, sum(net_change) as net_changefrom network_flowsgroup by month))