Afonso_DiazTotal (stake + unstake)
    Updated 2025-04-13
    with

    pricet as (
    select
    hour::date as date,
    avg(price) as price_usd
    from
    near.price.ez_prices_hourly
    where
    token_address = 'wrap.near'
    group by 1
    ),

    main as (
    select
    tx_hash,
    block_timestamp,
    deposit/1e24 as amount,
    amount * price_usd as amount_usd,
    signer_id as user,
    'Stake' as action
    from
    near.core.fact_actions_events_function_call
    join
    pricet on block_timestamp::date = date
    where
    method_name = 'deposit_and_stake'
    and receiver_id = 'shitzu.pool.near'
    and receipt_succeeded
    )
    -- union all

    -- select
    -- tx_hash,
    -- block_timestamp,
    -- args:amount/1e24 as amount,
    Last run: 24 days ago
    TRANSACTIONS
    USERS
    DAILY_AVERAGE_TRANSACTIONS
    DAILY_AVERAGE_USERS
    VOLUME_USD
    VOLUME_SHITZU
    1
    12114114.1050851.393222563910.30788255424936.985191
    1
    60B
    6s