Afonso_DiazGrouping buyers
    Updated 1 day ago
    with

    pricet as (
    select
    hour::date as date,
    avg(price) as token_price_usd
    from
    sei.price.ez_prices_hourly
    where
    token_address = 'usei'
    group by 1
    ),

    main as (
    select
    tx_hash,
    block_timestamp,
    -- Determine NFT collection address
    iff(
    decoded_log:consideration[0]:token != '0x0000000000000000000000000000000000000000',
    decoded_log:consideration[0]:token,
    decoded_log:offer[0]:token
    ) as collection_address,

    -- Determine buyer and seller addresses
    iff(
    collection_address = '0x0000000000000000000000000000000000000000',
    origin_from_address,
    decoded_log:consideration[0]:recipient
    ) as buyer_address,

    iff(
    collection_address != '0x0000000000000000000000000000000000000000',
    origin_from_address,
    decoded_log:consideration[0]:recipient
    Last run: 1 day ago
    BUYER_ACTIVITY_SEGMENT
    TOTAL_BUYERS
    1
    Active (6–10 Txns)304
    2
    Frequent (11–25 Txns)197
    3
    Occasional (2–5 Txns)1351
    4
    Power Seller (>50 Txns)66
    5
    Single Transaction2413
    6
    Very Active (26–50 Txns)66
    6
    188B
    582s