hessShare of Collections by New Users
    Updated 2024-09-16
    with new_users as ( select min(block_timestamp) as date,
    buyer_address
    from aptos.nft.ez_nft_sales
    group by 2)
    ,
    new as ( select DISTINCT buyer_address
    from new_users
    where date >= '2024-01-01')
    ,
    final as ( select buyer_address,
    count(DISTINCT block_timestamp::date) as days,
    count(*) as sales,
    count(DISTINCT project_name) as collections
    from aptos.nft.ez_nft_sales
    where block_timestamp >= '2024-01-01'
    and buyer_address in (select buyer_address from new)
    group by 1)


    select count(DISTINCT buyer_address) as buyers,
    collections
    from final
    group by 2
    having collections > 0


    QueryRunArchived: QueryRun has been archived