elsinaDistribution of User Transactions
    Updated 2025-02-26
    with base as (
    SELECT
    block_timestamp,
    origin_from_address,
    tx_hash,
    pool_name,
    CASE
    WHEN amount_in_usd IS NOT NULL AND amount_out_usd IS NOT NULL THEN (amount_in_usd + amount_out_usd) / 2
    ELSE COALESCE(amount_in_usd, amount_out_usd)
    END AS amount
    from
    avalanche.defi.ez_dex_swaps
    where
    platform = 'pangolin' and
    amount_in_usd IS NOT NULL OR amount_out_usd IS NOT NULL
    ),


    per_user as (
    SELECT
    origin_from_address as user,
    count(distinct tx_hash) as tx_count
    from base
    group by user
    )

    select
    case
    when tx_count < 2 then 'A. 1'
    when tx_count < 4 then 'B. 2-3'
    when tx_count < 8 then 'C. 4-7'
    when tx_count < 16 then 'D. 8-15'
    when tx_count < 32 then 'E. 16-31'
    when tx_count < 64 then 'F. 32-63'
    when tx_count < 128 then 'G. 64-127'
    else 'H. more than 128' end as dis,
    Last run: about 2 months ago
    DIS
    USER_COUNT
    USER_COUNT_PERCENTAGE
    1
    H. more than 128439041.325474
    2
    B. 2-392309327.868431
    3
    A. 1114530534.577072
    4
    G. 64-127491451.483701
    5
    C. 4-759356017.919739
    6
    E. 16-311607104.851879
    7
    F. 32-63988892.985486
    8
    D. 8-152977198.988218
    8
    234B
    6s