0xHaM-dNew Users vs. Onboarding Users to Projects
    Updated 2025-03-22
    -- forked from New Users vs. Onboarding Users to Projects @ https://flipsidecrypto.xyz/studio/queries/191cd564-a1ef-4e81-8ce7-0e37b4ebfac4

    -- forked from Yousefi_1994 / avalanche Project - Weekly New User on avalanche and New User for Project @ https://flipsidecrypto.xyz/Yousefi_1994/q/fMD14XV_dMtY/avalanche-project---weekly-new-user-on-avalanche-and-new-user-for-project

    --The avalanche_project table is forked from 'Zanyar_98' to fix the project name

    with projectsTb as (
    select
    address,
    project_name as project,
    label_type
    from
    avalanche.core.dim_labels
    where
    project_name is not null
    and label_type not in ('chadmin', 'cex', 'token')
    and project_name != 'Exchanges'
    ),
    avalanche_new_user as (
    select
    FROM_ADDRESS,
    min(block_timestamp) as first_transactions_timestamp
    from avalanche.core.fact_transactions
    where FROM_ADDRESS not in (select address from projectsTb)
    and STATUS = 'SUCCESS'
    group by FROM_ADDRESS
    ),
    new_user_on_new_final as (
    select
    date_trunc('month', first_transactions_timestamp) as date,
    count(distinct FROM_ADDRESS) as "Total Avalanche New Users",
    sum("Total Avalanche New Users") over (order by date) as "New User Growth Trends"
    from avalanche_new_user
    group by date
    having date is not null
    order by date
    QueryRunArchived: QueryRun has been archived