Query editor
-- Step 1: Calculate daily trading volume of GOAT in the last 3 yearsWITH daily_trading_volume AS (SELECTDATE(block_time) AS trade_date, -- Extract the date from block_timeSUM(amount_usd) AS total_volume -- Sum of trading volume in USD for each dayFROMdex_solana.tradesWHEREtoken_pair LIKE 'GOAT%' -- Filter for trades involving GOATAND block_time >= DATE_ADD('year', -3, CURRENT_DATE) -- Include only the last 3 yearsGROUP BYDATE(block_time) -- Group data by trade date)-- Step 2: Select daily trading volume with additional filtering for GOAT tradesSELECTdtv.trade_date,dtv.total_volumeFROMdaily_trading_volume dtvJOINdex_solana.trades t ON DATE(t.block_time) = dtv.trade_date -- Join on trade dateWHEREt.token_pair LIKE 'GOAT%' -- Ensure trades involve GOAT