Afonso_DiazGrouping transactions ($)
    Updated 2025-03-06
    with

    pricet as (
    select
    hour::date as date,
    avg(price) as token_price_usd
    from
    crosschain.price.ez_prices_hourly
    where
    blockchain = 'ethereum'
    and token_address = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
    group by 1
    ),

    main as (
    select
    tx_hash,
    block_timestamp,
    origin_from_address as staker,
    utils.udf_hex_to_int(substring(data, 67, 64))::bigint / 1e18 as amount,
    'Stake' as event_name
    from
    ink.core.fact_event_logs
    where
    tx_succeeded
    and topics[0] = '0x4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f'
    and origin_to_address = '0xcab283e4bb527aa9b157bae7180fef19e2aaa71a'

    union all

    select
    tx_hash,
    block_timestamp,
    origin_from_address as staker,
    utils.udf_hex_to_int(substring(data, 3, 64))::bigint / 1e18 as amount,
    'Unstake' as event_name
    Last run: about 2 months ago
    TYPE
    TRANSACTIONS
    1
    a. Less than 10 $62862
    2
    b. 10 - 50 $2797
    3
    c. 50 - 100 $313
    4
    d. 100 - 500 $397
    5
    e. 500 - 1000 $63
    6
    f. 1000 - 5000 $54
    7
    g. 5000 - 10,000 $5
    8
    h. 10,000 - 100,000 $2
    8
    196B
    14s