Query editor
withlast_updated_tmp as (selectdate_trunc('day', max(last_updated) - interval '15' minute) as latest_dayfromdune.ether_fi.result_etherfi_protocol_token_holderswhere day >= now() - interval '7' day -- filterunion allselectdate_trunc('day', now() - interval '4' hour) as latest_day),last_updated as (selectmin(latest_day) as latest_dayfromlast_updated_tmp),label_contracts as (selectq.*,coalesce(l.project, 'Unlabelled') as project,coalesce(l.label, 'Unlabelled') as categoryfromdune.ether_fi.result_etherfi_protocol_token_holders qleft joindune.ether_fi.result_addresses_traits l -- addresses traiton q.blockchain = l.blockchainand q.address = l.addresswhere q.day <= (select latest_day from last_updated) -- use latest updated timeand q.token_symbol = 'weETH'),defi_supply as (selectday,sum(token_balance) as supplyfromlabel_contractswhere category in ('Lending Protocol', 'Yield', 'Farm', 'Restaking', 'Dex', 'CDP', 'Leveraged Farming', 'LRT Stablecoin', 'Yield Aggregator', 'Payments')group by 1),get_prices as (selectday,price,eth_rate,supply/eth_rate as max_supply,supply_2 as supplyfrom(selectday,sum(casewhen token_address = 0xcd5fe23c85820f7b72d0926fc9b05b43e359b7ee then token_supply_usd/token_supply