shadilPower of whales in Realms based on Vote weight
    Updated 2022-08-30
    with table1 as (select top 30 voter as whale_address, sum(vote_weight) as whale_weight
    from solana.core.fact_proposal_votes
    where governance_platform ilike '%REALM%'
    group by whale_address
    order by whale_weight desc),

    table2 as (select voter as wallet_address, sum(vote_weight) as wallet_weight
    from solana.core.fact_proposal_votes
    where voter not in (select whale_address from table1)
    and governance_platform ilike '%REALM%'
    group by wallet_address)

    select 'Whales' as users, sum(whale_weight) as total from table1
    union
    select 'Users' as users, sum(wallet_weight) as total from table2
    group by users