Mrftiharsh-apricot copy copy
    Updated 8 hours ago
    -- forked from harsh-apricot copy @ https://flipsidecrypto.xyz/studio/queries/a3d49337-f7b9-4f9d-892c-efc3c854e31e
    with tbl AS
    (
    SELECT
    REGEXP_SUBSTR(fee_msg['transition']['outputs'][0]['value'], 'aleo[\\w]+') AS "Address",
    count (DISTINCT tx_id) as "Total transactions"
    FROM aleo.core.fact_transactions
    WHERE tx_succeeded = TRUE
    GROUP BY 1
    order by 2 desc
    )

    SELECT
    case
    when "Total transactions" = 1 then 'only 1 tx'
    when "Total transactions" >= 2 and "Total transactions" <= 5 then '2-5 tx'
    when "Total transactions" > 5 and "Total transactions" <= 10 then '6-10 tx'
    when "Total transactions" > 10 and "Total transactions" <= 50 then '11-50 tx'
    when "Total transactions" > 50 and "Total transactions" <= 100 then '51-100 tx'
    when "Total transactions" > 100 then 'more than 100 tx'
    end as "Tier",
    count (DISTINCT "Address") AS "Total Addresses"

    from tbl
    group by 1
    order by 2 desc

    Last run: about 8 hours agoAuto-refreshes every 12 hours
    Tier
    Total Addresses
    1
    2-5 tx961829
    2
    only 1 tx584038
    3
    6-10 tx215618
    4
    11-50 tx85826
    5
    51-100 tx6201
    6
    more than 100 tx3574
    6
    123B
    25s