Sbhn_NPrural-olive
    Updated 2025-01-22
    WITH price as (
    select hour::date as datee,
    avg(price) as usdprice
    from crosschain.price.ez_prices_hourly
    where symbol = 'OLAS'
    group by 1),

    tab1 as (
    select DISTINCT tx_hash
    from crosschain.olas.ez_olas_staking
    limit 100
    )

    select date_trunc('day',block_timestamp) as date,
    case when nft_to_address = '0x95146adf659f455f300d7521b3b62a3b6c4aba1f' then 'alpha 1'
    when nft_to_address = '0x2c8a5ac7b431ce04a037747519ba475884bce2fb' then 'alpha 2'
    when nft_to_address = '0x708e511d5fcb3bd5a5d42f42aa9a69ec5b0ee2e8' then 'alpha 3' end as operator,
    count(DISTINCT from_address) as stakers,
    sum(amount) as staked_olas,
    sum(amount*usdprice) as staked_usd,
    from base.core.fact_event_logs
    join base.core.ez_token_transfers b using(tx_hash)
    join base.nft.ez_nft_transfers using(tx_hash)
    left join price on block_timestamp::date = datee
    where topics[0] = '0xec97633905b1dbe9773a7536e9a986dcf89803e1193934b7b6d76587c68beb40'
    and to_address = '0xaea9ef993d8a1a164397642648df43f053d43d85'
    and nft_from_address = '0xaea9ef993d8a1a164397642648df43f053d43d85'
    and nft_to_address in ('0x95146adf659f455f300d7521b3b62a3b6c4aba1f','0x2c8a5ac7b431ce04a037747519ba475884bce2fb','0x708e511d5fcb3bd5a5d42f42aa9a69ec5b0ee2e8')
    group by 1,2
    Last run: 24 days ago
    DATE
    OPERATOR
    STAKERS
    STAKED_OLAS
    STAKED_USD
    1
    2024-12-21 00:00:00.000alpha 31500903.75
    2
    2024-11-18 00:00:00.000alpha 3210001644.166666667
    3
    2024-11-13 00:00:00.000alpha 31500996.458333333
    4
    2025-01-22 00:00:00.000alpha 1110094.760826667
    5
    2024-12-13 00:00:00.000alpha 21100191.083333333
    6
    2024-11-11 00:00:00.000alpha 3210002137.5
    7
    2024-11-11 00:00:00.000alpha 21100213.75
    8
    2024-12-21 00:00:00.000alpha 21100180.75
    9
    2024-11-23 00:00:00.000alpha 31500898.125
    10
    2024-11-08 00:00:00.000alpha 11100227.375
    11
    2025-01-17 00:00:00.000alpha 11100124.916666667
    12
    2024-12-27 00:00:00.000alpha 31500773.125
    13
    2024-12-08 00:00:00.000alpha 11100211.291666667
    14
    2024-11-28 00:00:00.000alpha 31500792.083333333
    15
    2024-11-15 00:00:00.000alpha 31500806.875
    16
    2024-11-14 00:00:00.000alpha 3420003418.333333333
    17
    2024-12-15 00:00:00.000alpha 315001140.625
    18
    2024-12-19 00:00:00.000alpha 11100192.958333333
    19
    2025-01-19 00:00:00.000alpha 11100115.270833333
    20
    2024-11-26 00:00:00.000alpha 31500833.333333333
    31
    2KB
    231s