Query editor
SELECTDATE_TRUNC('week', block_time) as week,project,COUNT(*) as trade_count,COUNT(DISTINCT taker) as unique_traders,COUNT(DISTINCT token_pair) as unique_pairs,COUNT(DISTINCT project) as active_projects,SUM(amount_usd) as volume_usd,AVG(amount_usd) as avg_trade_size_usdFROM dex.tradesWHERE blockchain = 'sonic'AND block_time >= TIMESTAMP '2025-01-01'AND amount_usd IS NOT NULLGROUP BY DATE_TRUNC('week', block_time), 2ORDER BY week DESC;