Query editor
-- Classify destination as contract vs EOA — proxy for use case-- Contracts = DeFi/DEX/CEX/protocols; EOA = P2P remittanceWITH transfers_with_type AS (SELECTt.blockchain,t.amount_usd,CASEWHEN c.address IS NOT NULL THEN 'Protocol / On-chain App'ELSE 'P2P / Wallet Transfer'END AS destination_typeFROM stablecoins_multichain.transfers tLEFT JOIN ethereum.contracts cON t."to" = CAST(c.address AS VARCHAR)AND t.blockchain = 'ethereum'WHERE t.block_date >= CURRENT_DATE - INTERVAL '30' DAYAND t.block_month >= DATE_TRUNC('month', CURRENT_DATE - INTERVAL '31' DAY)AND t.amount_usd BETWEEN 1 AND 10000AND t.blockchain = 'ethereum')SELECTdestination_type,COUNT(*) AS tx_count,SUM(amount_usd) AS volume_usdFROM transfers_with_typeGROUP BY 1ORDER BY volume_usd DESC