SniperBreakdown of Active users and New users by Project Type
    Updated 2025-02-10
    With tbl1 AS (
    SELECT
    block_timestamp,
    -- project_name,
    label_type,
    from_address,
    FROM avalanche.core.fact_transactions a
    JOIN avalanche.core.dim_labels b on a.to_address=b.address
    WHERE
    block_timestamp::date >= current_date - 31
    and LABEL_TYPE not in ('cex','token','chadmin','operator','token_contract')
    and STATUS = 'SUCCESS'
    ),

    new_user AS (
    SELECT
    from_address,
    MIN(block_timestamp) AS min_date
    FROM
    avalanche.core.fact_transactions
    GROUP BY 1
    having min_date >= current_date - 31
    )


    select label_type,
    case when from_address in (select from_address from new_user)
    then 'New Users' else 'Old Users' end as type,
    count(DISTINCT from_address) AS total_users
    from tbl1
    group by 1,2
    order by 3 desc
    Last run: 2 months ago
    LABEL_TYPE
    TYPE
    TOTAL_USERS
    1
    dexNew Users120363
    2
    bridgeNew Users120353
    3
    bridgeOld Users110315
    4
    dexOld Users30564
    5
    defiOld Users23744
    6
    dappOld Users12427
    7
    dappNew Users8654
    8
    defiNew Users6859
    9
    nftOld Users1616
    10
    gamesOld Users88
    11
    nftNew Users64
    12
    gamesNew Users14
    12
    318B
    22s