Query editor
WITH token_volumes AS (SELECTCONCAT ('''', token, '''') AS token,symbol,SUM(amount_usd) AS volumeFROM (-- Bought tokensSELECTtoken_bought_mint_address AS token,token_bought_symbol AS symbol,amount_usdFROM raydium_v4.tradesWHERE token_bought_mint_address NOT IN ('So11111111111111111111111111111111111111112', 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v', 'Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB') -- Exclude SOL, USDT, USDCAND block_time >= current_timestamp - INTERVAL '120' DAYUNION ALL-- Sold tokensSELECTtoken_sold_mint_address AS token,token_sold_symbol AS symbol,amount_usdFROM raydium_v4.tradesWHERE token_sold_mint_address NOT IN ('So11111111111111111111111111111111111111112', 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v', 'Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB') -- Exclude SOL, USDT, USDCAND block_time >= current_timestamp - INTERVAL '120' DAY) AS all_tradesGROUP BY token, symbol)SELECTROW_NUMBER() OVER (ORDER BY volume DESC) AS rank, -- Ranking the tokens by volumetoken,symbol,volumeFROM token_volumes-- WHERE token NOT IN ('Address_To_Discard_1', 'Address_To_Discard_2') -- Add more addresses to discard as neededORDER BY volume DESCLIMIT 100;