Query editor
withget_tvl as (select*fromquery_5154826where day = date_trunc('day', now() - interval '4' hour) -- at least four hours for incremental runs to updateand lower(token_symbol) in('eeth', 'weeth', 'liquideth', 'liquidusd', 'liquidbtc', 'liquideur', 'liquideuro', 'liquidreserve','liquidrwa', 'ebtc', 'weeths')),adjust_tvl as (selectgt.*,gt.token_supply_usd - coalesce(ph.token_balance_usd, 0) as adjusted_tvl_usd,gt.token_supply_eth - coalesce(ph.token_balance_eth, 0) as adjusted_tvl_ethfromget_tvl gtleft joinquery_4572679 phon gt.day = ph.dayand gt.token_symbol = ph.token_symbol),other_tvl as (selectcasewhen address = 0x7623e9DC0DA6FF821ddb9EbABA794054E078f8c4 then 'Early Adopter Program'else cast(address as VARCHAR)end as token_symbol,sum(token_balance_eth) as tvl_eth,sum(token_balance_usd) as tvl_usdfromdune.ether_fi.result_etherfi_assets_under_managementwhere day = date_trunc('day', now() - interval '4' hour)and address in (0x7623e9DC0DA6FF821ddb9EbABA794054E078f8c4, 0xcD12F7F1747Aaca69C61b7Af23FB5D5691191562, 0x4B8DF85d5BE4DF1e4D89840E5c7bd3F9D6361D48, 0x5836152812568244760ba356B5f3838Aa5B672e0)and lower(token_symbol) not in ('eeth', 'weeth', 'ebtc', 'liquideth')group by 1),days as (selectdate_trunc('day', timestamp) as dayfromutils.dayswhere timestamp >= date '2023-03-01'),full_staker_tvl as (select*fromquery_3254466),bnft_tfers as (selectdate_trunc('day', evt_block_time) as day,