Query editor
with daily_flows as (selectdate_trunc('day', evt_block_time) as day,sum(cast(amount as double) / 1e18) as staked_infrom megaeth_megaeth."MegaStaking_evt_Staked"group by 1union allselectdate_trunc('day', evt_block_time) as day,-sum(cast(amount as double) / 1e18) as staked_infrom megaeth_megaeth."MegaStaking_evt_Unstaked"group by 1),net_daily as (selectday,sum(staked_in) as net_flowfrom daily_flowsgroup by 1)selectday,sum(net_flow) over (order by day asc rows unbounded preceding) as cumulative_staked_megafrom net_dailyorder by day asc