Query editor
with all_flows as (selectdate_trunc('month', call_block_date) as month,account_subDao as subdao,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 allselectdate_trunc('month', call_block_date) as month,account_supplyMint as subdao,- cast(json_extract_scalar(args, '$.RedeemArgsV0.amount') as bigint) * 1e-8 as net_changefrom helium_solana.treasury_management_call_redeemV0),monthly_net as (selectmonth,sum(net_change) as net_changefrom all_flowsgroup by month)selectmonth,sum(net_change) over (order by monthrows between unbounded preceding and current row) as balancefrom monthly_netorder by month;