Query editor
with totals as (select time, sum(net_flow_usd) as total_net_flow, sum(net_tvl) as total_net_tvl, sum(net_tvl_usd) as total_usd_tvlfrom query_3960347group by 1),supply_and_staked as (select day as time, cir_supply, current_stakedfrom dune.balancercap.result_eth_general_statswhere day >= cast('2024-07-24' as timestamp) -- start fetching),prep as (select t.time, t.total_net_flow, t.total_net_tvl, t.total_usd_tvl, s.cir_supply, (t.total_net_tvl/s.cir_supply*100) as supply_ratio,s.current_staked, (t.total_net_tvl/s.current_staked*100) as staked_ratiofrom totals tleft join supply_and_staked s on t.time = s.time)select * from preporder by time desc