LTirrellTop Stakers Current -- more than 5000 with lag
    Updated 2023-05-25
    -- forked from Top Stakers Current -- more than 5000 @ https://flipsidecrypto.xyz/edit/queries/2465eea6-0d61-4dc3-b697-1aaa770ed99d
    with
    fact_stake as (
    select
    block_timestamp as f_block_timestamp,
    tx_id as f_tx_id,
    index as f_index,
    event_type as f_event_type,
    instruction
    from
    solana.core.fact_staking_lp_actions
    ),
    base as (
    select
    *,
    signers[0] as fee_payer,
    post_tx_staked_balance / pow(10, 9) as net_stake,
    row_number() over (
    partition by
    stake_account
    order by
    block_id desc,
    index desc,
    tx_id
    ) as rn,
    fact_stake.instruction:parsed:info as info
    from
    solana.core.ez_staking_lp_actions
    left join fact_stake on (
    tx_id = fact_stake.f_tx_id
    and block_timestamp = fact_stake.f_block_timestamp
    and index = fact_stake.f_index
    and event_type = fact_stake.f_event_type
    )
    where
    SUCCEEDED = TRUE
    Run a query to Download Data