elsinaDistribution of Minters Transactions
    Updated 2025-03-09
    with base as (
    select
    event_name,
    block_timestamp,
    tx_hash,
    decoded_log:"benefactor" as user,
    decoded_log:"collateral_amount"/pow(10,6) as collateral,
    decoded_log:"avusd_amount"/pow(10,18) as mint_amount
    from avalanche.core.ez_decoded_event_logs
    where
    contract_address = '0x1499cb3197427b78dc0e2d356a1e0e4149e0ed51' and
    event_name in ('Mint') and
    tx_succeeded = 'TRUE'
    ),


    per_user as (
    SELECT
    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'
    else 'D. more than 8' end as dis,
    count(distinct user) as user_count,
    100.0 * count(distinct user) / sum(count(distinct user)) over () as user_count_percentage
    from per_user
    group by 1

    Last run: about 2 months ago
    DIS
    USER_COUNT
    USER_COUNT_PERCENTAGE
    1
    B. 2-36827.091633
    2
    D. more than 872.788845
    3
    C. 4-7155.976096
    4
    A. 116164.143426
    4
    101B
    3s