Query editor
with top_tokens AS (select contract_address, sum(amount_usd) as aum_usdfrom query_3099888group by 1 order by 2 desclimit 10),data as (selectdate_trunc('day', block_time) as date,contract_address,symbol,case when contract_address IN (select contract_address from top_tokens) then symbol else 'other' end as processed_symbol,count(distinct tx_hash) as n_transfers,count(distinct address) as n_addresses,sum(case when amount_usd >= 0 then amount_usd end) as total_inflows,sum(case when amount_usd < 0 then amount_usd end) as total_outflows,sum(amount_raw) as net_inflows_raw,sum(amount) as net_inflows,sum(amount_usd) as net_inflows_usdfrom query_3099888 -- safe transferswhere direction = 'in'group by 1, 2, 3)select*from datawhere trueand date >= current_date - INTERVAL '90' DAY