Query editor
selectavg(amount_usd) as avg_burned,sum(amount_usd) as total_burned,max(amount_usd) as max_burnedfrom (SELECT --19 salest1.token_id,max(t1.amount_usd) AS amount_usdFROM nft.trades t1INNER JOIN ( SELECT token_id, MAX(block_time) AS latest_day --179from nft.tradeswhere token_id in (selectcast(token_id as varchar)from nft.transferswhere contract_address = 0x52f516a94D0eb5Fd8fA628484e864C80BED497e4and block_date > timestamp '2023-04-27'and to = 0x0000000000000000000000000000000000000000)and nft_contract_address = 0x52f516a94D0eb5Fd8fA628484e864C80BED497e4GROUP BY token_id) t2 ON t1.token_id = t2.token_id AND t1.block_time = t2.latest_daywhere nft_contract_address = 0x52f516a94D0eb5Fd8fA628484e864C80BED497e4group by 1 )