kakamoraTop 10 Lido Stakers
    Updated 2022-11-25
    with lido_stakers as (
    SELECT
    block_timestamp,
    tx_hash,
    event_inputs:amount/1e18 as staked_amount,
    event_inputs:sender::string as wallet
    from ethereum_core.fact_event_logs
    where contract_address = lower('0xae7ab96520de3a18e5e111b5eaab095312d7fe84')
    -- AND block_timestamp > CURRENT_DATE - 7
    and event_name = 'Submitted'
    and event_removed = false
    ),
    top_stakers as (
    SELECT
    wallet,
    sum(staked_amount) as staked_eth
    FROM lido_stakers
    GROUP BY wallet
    ORDER BY staked_eth DESC
    LIMIT 10
    )
    SELECT
    NVL(address_name, wallet) as staker,
    staked_eth
    FROM top_stakers
    LEFT JOIN ethereum_core.dim_labels ON address = wallet
    Run a query to Download Data