Flipside Community2b) popular apps for first time users ethereum
    Updated 2024-11-03
    -- forked from 2b) popular apps for first time users @ https://flipsidecrypto.xyz/edit/queries/c2b4e03c-0b95-4cb4-afb5-df28964f2d0c

    -- forked from 2b) popular apps for first time users @ https://flipsidecrypto.xyz/edit/queries/4a6093f9-8096-4ef8-8818-87df6a6daa13

    -- forked from 2b @ https://flipsidecrypto.xyz/edit/queries/956394e3-fe4f-4801-b8b3-68e508994b63

    with addresses as
    (
    select from_address, min(block_timestamp) as first_transaction_sent
    from ethereum.core.fact_transactions
    group by from_address
    having first_transaction_sent >= '{{Start_date}}'
    ),
    first_transaction as
    (
    select * from ethereum.core.fact_transactions
    where 1=1
    and block_timestamp >= '{{Start_date}}'
    and from_address in ( select from_address from addresses)
    qualify(row_number() over (partition by from_address order by block_timestamp asc)=1)
    ),
    top_200 as (
    select dl.label as project_name,
    count(distinct ft.from_address) as number_of_users,
    row_number() over (order by number_of_users desc) as rn
    from first_transaction ft
    inner join ethereum.core.dim_labels dl
    on ft.to_address=dl.address
    where dl.label_type not in ('token','cex','chadmin')
    group by dl.label
    order by number_of_users desc
    limit 200
    )

    select project_name,number_of_users from top_200 where rn<10
    union
    QueryRunArchived: QueryRun has been archived