Query editor
WITH whale_activity AS (SELECTtoken_bought_mint_address AS whale_address,SUM(amount_usd) AS total_volume_usd,COUNT(*) AS num_transactionsFROM dex_solana.tradesWHERE (token_bought_symbol = 'POPCAT' OR token_sold_symbol = 'POPCAT')AND block_time >= CURRENT_TIMESTAMP - INTERVAL '30' DAYGROUP BY 1UNION ALLSELECTtoken_sold_mint_address AS whale_address,SUM(amount_usd) AS total_volume_usd,COUNT(*) AS num_transactionsFROM dex_solana.tradesWHERE (token_bought_symbol = 'POPCAT' OR token_sold_symbol = 'POPCAT')AND block_time >= CURRENT_TIMESTAMP - INTERVAL '30' DAYGROUP BY 1)SELECTwhale_address,SUM(total_volume_usd) as total_volume_usd,SUM(num_transactions) as num_transactions,SUM(total_volume_usd) / SUM(SUM(total_volume_usd)) OVER () AS pct_of_total_volumeFROM whale_activityWHERE whale_address IS NOT NULLGROUP BY 1ORDER BY total_volume_usd DESCLIMIT 10