Mrftiswell chain users analysis
    Updated 20 hours ago
    -- forked from similar-cyan @ https://flipsidecrypto.xyz/studio/queries/18a06027-f806-4600-a6eb-fdedf6f47270

    with tbl AS
    (
    SELECT
    from_address as "Address",
    count (DISTINCT tx_hash) as "Total tx"
    from swell.core.fact_transactions
    GROUP by 1
    order by 2 DESC
    )
    SELECT case when "Total tx" = 1 then 'tier1: only 1 tx'
    when "Total tx" > 1 and "Total tx" <= 5 then 'tier2: 1-5 txs'
    when "Total tx" > 5 and "Total tx" <= 10 then 'tier3: 5-10 txs'
    when "Total tx" > 10 and "Total tx" <= 50 then 'tier4: 10-50 txs'
    when "Total tx" > 50 and "Total tx" <= 100 then 'tier5: 50-100 txs'
    when "Total tx" > 100 and "Total tx" <= 500 then 'tier6: 100-500 txs'
    when "Total tx" > 500 and "Total tx" <= 1000 then 'tier7: 500-1000 txs'
    when "Total tx" > 1000 then 'tier8: more then 1000 txs'end as "Tier",
    count (DISTINCT "Address") AS "Total Addresses"
    from tbl
    group by 1
    order by 1 asc


    Last run: about 20 hours agoAuto-refreshes every 12 hours