with lst_min as (
select
buyer_address
,iff(project_name is null ,'BasePaint',project_name) as collection
,min(block_timestamp)::date as min_date
from base.nft.ez_nft_sales
group by 1,2
)
select
min_date
,collection
,count(buyer_address) as "New users"
,sum("New users") over(partition by collection order by min_date) as "cumulative 'New users'"
from lst_min
where min_date>=current_date-30
group by 1,2
order by 1