Afonso_DiazGrouping txns
    Updated 2025-04-01
    with

    pricet as (
    select
    hour::date as date,
    token_address,
    avg(price) as price_usd
    from
    sei.price.ez_prices_hourly
    group by 1, 2
    ),

    main as (
    select
    tx_hash,
    block_timestamp,
    to_address as user,
    contract_address as token_address,
    symbol,
    amount,
    amount * price_usd as amount_usd
    from
    sei.core_evm.ez_token_transfers a
    left join
    pricet on block_timestamp::date = date and pricet.token_address = a.contract_address
    where
    origin_to_address = '0xc097ab8cd7b053326dfe9fb3e3a31a0cce3b526f'
    )

    select
    case
    when amount_usd < 10 then 'a. Less than 10$'
    when amount_usd <= 50 then 'b. 10 - 50 $'
    when amount_usd <= 100 then 'c. 50 - 100 $'
    when amount_usd <= 500 then 'd. 100 - 500 $'
    when amount_usd <= 1000 then 'e. 500 - 1000 $'
    Last run: 2 months ago
    TYPE
    TRANSACTIONS
    1
    a. Less than 10$5277
    2
    b. 10 - 50 $3832
    3
    c. 50 - 100 $3853
    4
    d. 100 - 500 $11024
    5
    e. 500 - 1000 $1766
    6
    f. 1000 - 5000 $1805
    7
    g. 5000 - 10,000 $898
    8
    h. 10,000 - 100,000 $1352
    9
    i. More than 100,000$22765
    9
    238B
    2s