Query editor
with tvl as (select address, sum(eth) as tvl from (select "from" as address, sum(cast(value as double)/1e18) as ethfrom ethereum.traceswhere "to" =0x32400084C286CF3E17e7B677ea9583e60a000324AND (LOWER(call_type) NOT IN ('delegatecall', 'callcode', 'staticcall') or call_type is null)AND success = trueAND block_time>=date('2023-02-14')group by 1union allselect "to" as address, sum(cast(value as double)/1e18*-1) as ethfrom ethereum.traceswhere "from" =0x32400084C286CF3E17e7B677ea9583e60a000324AND (LOWER(call_type) NOT IN ('delegatecall', 'callcode', 'staticcall') or call_type is null)AND success = trueAND block_time>=date('2023-02-14')group by 1)agroup by 1),current_tvl as (select sum(eth) as total_tvl from (select sum(cast(value as double)/1e18) as ethfrom ethereum.traceswhere "to" =0x32400084C286CF3E17e7B677ea9583e60a000324AND (LOWER(call_type) NOT IN ('delegatecall', 'callcode', 'staticcall') or call_type is null)AND success = trueAND block_time>=date('2023-02-14')union allselect sum(cast(value as double)/1e18*-1) as ethfrom ethereum.traceswhere "from" =0x32400084C286CF3E17e7B677ea9583e60a000324AND (LOWER(call_type) NOT IN ('delegatecall', 'callcode', 'staticcall') or call_type is null)AND success = trueAND block_time>=date('2023-02-14'))a)select a.*, tvl*price as tvl_usd, tvl/total_tvl as share from(select distinctCONCAT('<a href="https://etherscan.io/address/', cast(a.address as varchar), '" target="_blank">',cast(a.address as varchar), '</a>') as address, c.name as label_ens,tvlfrom tvl aleft join labels.ens con a.address=c.addressleft join labels.funds don a.address=d.addressleft join labels.institution eon a.address=cast(e.address as varbinary))a,prices.usd_latest b, current_tvlwhere b.contract_address is null and symbol='ETH'order by 4 desclimit 100