Query editor
WITH wallet_actions AS (SELECTtx_signer as wallet,COUNT(*) as action_countFROM jupiter_solana.aggregator_swapsWHERE block_time >= CURRENT_DATE - INTERVAL '30' dayGROUP BY tx_signer),total_actions AS (SELECT SUM(action_count) as totalFROM wallet_actions),wallet_cumulative AS (SELECTwallet,action_count,SUM(action_count) OVER (ORDER BY action_count DESC) as cumulative_actions,(SELECT total FROM total_actions) as total_actionsFROM wallet_actions),top_10_pct AS (SELECTwallet,action_count,cumulative_actions,total_actionsFROM wallet_cumulativeWHERE cumulative_actions <= total_actions * 0.10)SELECTCOUNT(DISTINCT wallet) as top_10_pct_wallet_count,SUM(action_count) as top_10_pct_actions,MAX(total_actions) as total_actions,ROUND(CAST(SUM(action_count) AS DOUBLE) / MAX(total_actions) * 100, 2) as top_10_pct_shareFROM top_10_pct