Query editor
with tmp as (selectdate_trunc('day', evt_block_time) as dt,sum(value/1e18) as amountfrom(selectevt_block_time,-cast(value as double) as valuefrom erc20_ethereum.evt_Transferwhere contract_address = 0x4c9EDD5852cd905f086C759E8383e09bff1E68B3and to=0x0000000000000000000000000000000000000000union allselectevt_block_time,cast(value as double) as valuefrom erc20_ethereum.evt_Transferwhere contract_address = 0x4c9EDD5852cd905f086C759E8383e09bff1E68B3and "from"=0x0000000000000000000000000000000000000000)group by 1),usde as (selectdt,sum(amount) over(order by dt asc) as total_supply_usdefrom tmp usdeorder by dt desc)selectdt,total_supply_usde,susde.total_supply as total_supply_susde,-- lpstaking.total_supply as total_lp_staking,susde.total_supply / total_supply_usde as staked_percent-- lpstaking.total_supply / total_supply_usde as total_lp_stakingfrom usdeleft join query_3456083 susde using(dt)-- left join query_3716708 lpstaking using(dt)order by dt desc