KaskoazulStake and delegators Dif validators
    Updated 2022-08-04
    WITH al AS (
    SELECT c.block_timestamp,
    t.tx_receiver,
    c.deposit,
    t.tx_signer
    FROM flipside_prod_db.mdao_near.actions_events_function_call c
    JOIN flipside_prod_db.mdao_near.transactions t
    ON c.txn_hash = t.txn_hash
    WHERE method_name IN ('deposit_and_stake', 'stake', 'stake_all', 'unstake', 'unstake_all', 'epoch_stake', 'epoch_unstake')
    ),

    ordered as (
    select date_trunc ('week', block_timestamp) as fecha,
    tx_receiver as governor,
    sum (deposit/ pow(10,24)) as stake_NEAR,
    sum (stake_NEAR) over (partition by governor order by fecha) as cumulative_stake,
    count (distinct tx_signer) as delegators
    from al
    where governor IN ('meta-pool.near','astro-stakers.poolv1.near', 'aurora.pool.near', 'stake1.poolv1.near', 'bisontrails.poolv1.near')
    group by 1,2
    order by 3 desc
    )

    select * from ordered


    Run a query to Download Data