Query editor
WITH total_transactions AS (SELECT COUNT(*) as total_countFROM dex_solana.tradesWHERE token_bought_symbol = 'BONK'OR token_sold_symbol = 'BONK'),trader_counts AS (SELECTtrader_id,COUNT(*) AS transaction_countFROM dex_solana.tradesWHEREtoken_bought_symbol = 'BONK'OR token_sold_symbol = 'BONK'GROUP BYtrader_id),ranked_traders AS (SELECTtc.trader_id,tc.transaction_count,tc.transaction_count * 100.0 / tt.total_count AS active_ratio,SUM(tc.transaction_count) OVER (ORDER BY tc.transaction_count DESC) * 100.0 / tt.total_count AS cumulative_ratioFROM trader_counts tcCROSS JOIN total_transactions tt)SELECT *FROM ranked_tradersORDER BY transaction_count DESCLIMIT 10;