SalehUser Distribution by Stake Volume _date
    Updated 2025-05-12
    -- forked from User Distribution by Stake Volume @ https://flipsidecrypto.xyz/studio/queries/31303efa-4b9d-4176-ad6f-5cc847591653

    ----------------------------------------------Price------------------------------------
    with lst_aptos_price_last as (
    select
    median(price) as aptos_price
    from aptos.price.ez_prices_hourly
    where symbol='APT'
    and hour::date=current_date
    )
    ,lst_aptos_price_all as (
    select
    hour::date as price_date
    ,median(price) as "APT Price"
    from aptos.price.ez_prices_hourly
    where symbol='APT'
    group by 1
    order by 1
    )
    ---------------------------------------------Stake-------------------------------------
    ,lst_stake as (
    select
    block_timestamp::date as date_a
    ,tx_hash
    ,event_data:delegator as staker
    ,event_data:amount/1e8 as amount
    ,event_data:t_apt_coins/1e8 as tAPT_amount
    from aptos.core.fact_events
    where block_timestamp::date >='2022-10-19'
    and SUCCESS=true
    and TX_TYPE='user_transaction'
    and event_module='stake_router'
    and EVENT_RESOURCE='StakeEvent'
    and event_address='0x8f396e4246b2ba87b51c0739ef5ea4f26515a98375308c31ac2ec1e42142a57f'
    group by all
    )
    Last run: 12 days ago
    DATE
    ($) Staking Distribution
    DELEGATORS
    1
    2025-04-25 00:00:00.000[less than 10 ($)]7
    2
    2025-04-19 00:00:00.000[less than 10 ($)]4
    3
    2025-04-30 00:00:00.000[less than 10 ($)]4
    4
    2025-04-24 00:00:00.000[less than 10 ($)]3
    5
    2025-04-29 00:00:00.000[11-100 ($)]3
    6
    2025-04-16 00:00:00.000[less than 10 ($)]2
    7
    2025-04-21 00:00:00.000[less than 10 ($)]2
    8
    2025-04-13 00:00:00.000[less than 10 ($)]2
    9
    2025-04-21 00:00:00.000[11-100 ($)]2
    10
    2025-04-12 00:00:00.000[less than 10 ($)]2
    11
    2025-05-03 00:00:00.000[11-100 ($)]2
    12
    2025-04-26 00:00:00.000[less than 10 ($)]2
    13
    2025-04-25 00:00:00.000[101-500 ($)]2
    14
    2025-04-26 00:00:00.000[11-100 ($)]2
    15
    2025-04-30 00:00:00.000[11-100 ($)]2
    16
    2025-04-17 00:00:00.000[less than 10 ($)]2
    17
    2025-04-14 00:00:00.000[less than 10 ($)]2
    18
    2025-04-13 00:00:00.000[11-100 ($)]2
    19
    2025-04-27 00:00:00.000[11-100 ($)]1
    20
    2025-04-18 00:00:00.000[101-500 ($)]1
    49
    2KB
    5s