LTirrellTop Stakers -- given addresses and more than 500
    Updated 2023-05-19
    -- forked from h4wk / 900 addrs staking info @ https://flipsidecrypto.xyz/h4wk/q/2023-05-06-02-22-pm-nzoEkj
    -- forked from h4wk / SOL Stakers Whales @ https://flipsidecrypto.xyz/h4wk/q/sol-stakers-amount-distribution-phTV-A
    with
    latest_stake_vol as (
    select
    block_timestamp,
    tx_id,
    event_type,
    -- signers[0] as staker,
    stake_authority as staker,
    withdraw_authority,
    stake_account,
    post_tx_staked_balance / pow(10, 9) as net_stake,
    row_number() over (
    partition by
    stake_account
    order by
    block_timestamp desc
    ) as rn
    from
    solana.core.ez_staking_lp_actions
    where
    SUCCEEDED = TRUE
    and block_timestamp is not null
    and event_type not in ('setLockup')
    ),
    base as (
    select
    staker,
    sum(net_stake) as total_stake,
    'given addreess' as address_type
    from
    latest_stake_vol
    where
    rn = 1
    -- and stake_authority in (
    Run a query to Download Data