RayyykLaLiga Golazos 3
    Updated 2022-12-04
    with table_1 as (select min(block_timestamp) as first_purchase,
    case
    when nft_collection = 'A.87ca73a41bb50ad5.Golazos' then 'LaLiga Golazos'
    when nft_collection = 'A.0b2a3299cc857e29.TopShot' then 'NBA TopShot'
    when nft_collection = 'A.e4cf4bdc1751c65d.AllDay' then 'NFL AllDay'
    end as collection_name,
    buyer
    from flow.core.ez_nft_sales
    where tx_succeeded = 'TRUE'
    and nft_collection in ('A.87ca73a41bb50ad5.Golazos', 'A.0b2a3299cc857e29.TopShot', 'A.e4cf4bdc1751c65d.AllDay')
    group by 2,3),
    flow as (select date_trunc ('day', first_purchase) as day,
    collection_name,
    count(distinct(buyer)) as new_wallets,
    sum(new_wallets) over (partition by collection_name order by day) as cumu_new_wallets,
    row_number () over (partition by collection_name order by day) as day_count
    from table_1
    group by 1,2),

    table_11 as (select min(block_timestamp) as first_purchase,
    'FIFA+ Collect' as collection,
    purchaser
    from algorand.nft.ez_nft_sales_fifa
    where sale_type = 'secondary'
    group by 2,3),

    algorand as (select date_trunc ('day', first_purchase) as day,
    collection,
    count(distinct(purchaser)) as new_wallets,
    sum(new_wallets) over (order by day) as cumu_new_wallets,
    row_number () over (order by day) as day_count
    from table_11
    group by 1,2)

    select *
    Run a query to Download Data