Query editor
WITH wallet_volumes AS (SELECTtrader_id,SUM(amount_usd) AS total_volume_usdFROMdex_solana.tradesWHEREtoken_bought_mint_address = '9WPTUkh8fKuCnepRWoPYLH3aK9gSjPHFDenBq2X1Czdp'OR token_sold_mint_address = '9WPTUkh8fKuCnepRWoPYLH3aK9gSjPHFDenBq2X1Czdp'GROUP BYtrader_id),total_volume AS (SELECTSUM(total_volume_usd) AS overall_volumeFROMwallet_volumes),ranked_wallets AS (SELECTtrader_id,total_volume_usd,total_volume_usd / overall_volume * 100 AS volume_percentageFROMwallet_volumes, total_volumeORDER BYtotal_volume_usd DESC)SELECTtrader_id,total_volume_usd,volume_percentage,SUM(volume_percentage) OVER (ORDER BY total_volume_usd DESC ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS cumulative_percentageFROMranked_walletsORDER BYtotal_volume_usd DESC;