Query editor
WITHtoken_start AS (SELECT token_bought_address AS token_address, blockchain, MIN(block_month) start_month, MIN(block_time) AS start_date, MAX(block_time) AS end_date,DATE_DIFF('day', MIN(block_time), MAX(block_time)) AS days_active, SUM(token_bought_amount) AS bought_amt, SUM(amount_usd) AS usdFROM dex.tradesWHERE block_time >= CURRENT_DATE - INTERVAL '4' monthGROUP BY 1, 2),b as (SELECT start_month, blockchain, token_address, SUM(usd) AS usd, AVG(days_active) AS avg_days_active, AVG(usd / IF(bought_amt > 0, bought_amt, 1)) AS avg_priceFROM token_startWHERE start_month > CURRENT_DATE - INTERVAL '3' monthGROUP BY 1, 2,3),d as( select t.block_time as deploy_date, b.blockchain, b.token_address, t."from" as deployer, usd, avg_days_activefrom bjoin evms.creation_traces t on t.blockchain = b.blockchain and t.address = b.token_addresswhere usd > 1500000),fd as (select deployer, blockchain, count(*) as project_count, sum(usd) as total_volumefrom dgroup by 1,2)select *from d