Query editor
SELECTdate_trunc('hour', block_time) as "hour of the day (UTC)",CASEWHEN token_bought_address = 0xe514d9deb7966c8be0ca922de8a064264ea6bcd4THEN 'WRON Bought'ELSE 'WRON Sold'END as direction,COUNT(DISTINCT tx_hash) as "trades count",COUNT(DISTINCT tx_from) as "unique traders",SUM(amount_usd) as "trade volume (USD)",AVG(amount_usd) as "avg trade size (USD)"FROM dex.tradesWHERE blockchain = 'ronin'AND project = 'katana'AND (token_bought_address = 0xe514d9deb7966c8be0ca922de8a064264ea6bcd4OR token_sold_address = 0xe514d9deb7966c8be0ca922de8a064264ea6bcd4)AND block_time >= CURRENT_DATE - INTERVAL '30' dayGROUP BY 1, 2ORDER BY 1, 2