MLDZMNTPD10
    Updated 2023-01-31
    SELECT
    tx_receiver as validator,
    COUNT(DISTINCT tx_signer) as number_of_stakers,
    COUNT(DISTINCT a.TX_HASH) as number_transactions,
    SUM(b.tx:actions[0]:FunctionCall:deposit/pow(10,24)) net_stake,
    SUM(b.tx:actions[0]:FunctionCall:deposit/pow(10,24))/COUNT(DISTINCT tx_signer) as near_per_staker,
    row_number() over (order by net_stake desc) as rank1
    FROM near.core.fact_actions_events_function_call a
    JOIN near.core.fact_transactions b
    ON a.tx_hash = b.tx_hash
    WHERE method_name = 'deposit_and_stake'
    AND b.block_timestamp::date < CURRENT_DATE
    AND a.block_timestamp::date < CURRENT_DATE
    GROUP BY 1
    order by 4 desc limit 10
    Run a query to Download Data