Query editor
with dates as (with day_seq as (SELECT(sequence (cast('2020-11-03' as date),cast(date_trunc('day',now()) as date),interval '1' day )) as day )select days.dayfrom day_seqcross join unnest(day) as days(day)), cbeth_supply as(selectd.day as time,'cbETH (Coinbase)' as LST_project, --0xBe9895146f7AF43049ca1c1AE358B0541Ea49704cumulative_amountfrom dates dleft join(select *,lead("time", 1, date_trunc('day', now() + interval '1' day)) over (order by "time") as next_timefrom( select time,SUM(daily_cbeth_supply_growth) over (order by time) as cumulative_amountfrom( select time,sum(amount)/1e18 as daily_cbeth_supply_growthfrom(selectdate_trunc('day',evt_block_time) as time,CAST(amount as DOUBLE) as amountfrom coinbase_ethereum.StakedTokenV1_evt_Mintunion allselectdate_trunc('day',evt_block_time) as time,-1 * CAST(amount as DOUBLE) as amountfrom coinbase_ethereum.StakedTokenV1_evt_Burn)group by 1))) tron d.day >= tr.time and d.day < tr.next_time), wbeth_supply as(selectd.day as time,'wbETH (Binance)' as LST_project, --0xa2E3356610840701BDf5611a53974510Ae27E2e1cumulative_amountfrom dates dleft join(select *,lead("time", 1, date_trunc('day',now() + interval '1' day)) over (order by "time") as next_time