Query editor
with balance_segments as (selectaddress, sol_balance, casewhen sol_balance >= 10000then 'Whale (10,000+ SOL)'when sol_balance >= 1000then 'Large Holder (1,000-9,999 SOL)'when sol_balance >= 100then 'Medium Holder (100-999 SOL)'when sol_balance >= 10then 'Small Holder (10-99 SOL)'when sol_balance >= 1then 'Retail (1-9.99 SOL)'when sol_balance >= 0.1then 'Dust (0.1-0.99 SOL)'else'Micro (< 0.1 SOL)'end as wallet_categoryfrom solana_utils.latest_balanceswhere token_mint_address is null /* This indicates native SOL balances */and sol_balance > 0)selectwallet_category, COUNT(*) as num_wallets, SUM(sol_balance) as total_sol, ROUND(AVG(sol_balance), 2) as avg_sol_balance, ROUND(MIN(sol_balance), 4) as min_sol_balance, ROUND(MAX(sol_balance), 2) as max_sol_balance, ROUND((TRY_CAST(COUNT(*) as DECIMAL) / SUM(COUNT(*)) over ()) * 100, 2) as percent_of_wallets, ROUND((TRY_CAST(SUM(sol_balance) as DECIMAL) / SUM(SUM(sol_balance)) over ()) * 100, 2) as percent_of_sol_supplyfrom balance_segmentsgroup bywallet_categoryorder bymin_sol_balance desc