Mrftixerothermic-azure copy copy
    Updated 2025-02-25
    -- forked from xerothermic-azure copy @ https://flipsidecrypto.xyz/studio/queries/f6eb3743-6ce2-4bd9-81c5-d9dafcc4ff64

    -- I used these queries for forking:
    -- forked from [Parent Query] NEP245 Parsed Events - 20241205 @ https://flipsidecrypto.xyz/studio/queries/9016ac39-e42b-4591-bea9-dabef61822f7
    -- forked from [Parent Query] NEP245 Parsed Mints and Burns Events @ https://flipsidecrypto.xyz/studio/queries/1ca044ae-9e66-4f51-bc61-0cc181cfc50e

    with alldata AS
    (
    with database as
    (
    select BLOCK_TIMESTAMP,TX_HASH,MEMO,LOG_EVENT_INDEX,OWNER_ID,SYMBOL,OLD_OWNER_ID,NEW_OWNER_ID,TOKEN_AMOUNT_ADJ,AMOUNT_USD
    from $query('6539c74d-1822-495e-b77a-d376b9271099')
    where MEMO in ('deposit')
    )

    SELECT
    owner_id as "Address",
    count (DISTINCT tx_hash) as "Total Deposits",
    sum (amount_usd) as "Total deposit volume (USD)"
    from database
    group by 1
    order by 2 desc
    )

    SELECT CASE
    WHEN "Total Deposits" >= 10 THEN 'Tier1: more than 10 Deposits'
    WHEN "Total Deposits" >= 5
    and "Total Deposits" < 10 THEN 'Tier2: 5-10 Deposits'
    WHEN "Total Deposits" >= 2
    and "Total Deposits" < 5 THEN 'Tier3: 2-5 Deposits'
    WHEN "Total Deposits" =1 THEN 'Tier4: only 1 Deposit'
    END AS "Tier"
    , COUNT(1) AS "Total Addresses"
    , SUM("Total Deposits") AS "Tier Total Deposits"
    FROM alldata
    GROUP BY 1
    Last run: 24 days agoAuto-refreshes every 12 hours
    Tier
    Total Addresses
    Tier Total Deposits
    1
    Tier1: more than 10 Deposits1243849
    2
    Tier2: 5-10 Deposits1991270
    3
    Tier3: 2-5 Deposits5811499
    4
    Tier4: only 1 Deposit10001000
    4
    146B
    2s