with stakers as (
select delegator ,
min (BLOCK_TIMESTAMP) min_date
from flow.core.ez_staking_actions
where ACTION in ('TokensCommitted','DelegatorTokensCommitted')
group by 1
)
select date_trunc(week,min_date) weekly ,
count (DISTINCT delegator) new_stakers,
sum (new_stakers) over (order by weekly ) cum_new_stakers
from stakers
GROUP by 1