elsinaDistribution of User Transactions
    Updated 9 days ago
    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: 9 days ago
    DIS
    USER_COUNT
    USER_COUNT_PERCENTAGE
    1
    H. more than 128451981.323671
    2
    B. 2-395911628.088719
    3
    G. 64-127517581.515787
    4
    E. 16-311644664.81656
    5
    C. 4-760909317.837928
    6
    F. 32-631000402.929776
    7
    A. 1117739034.481102
    8
    D. 8-153075349.006456
    8
    234B
    8s