with first as (select
delegator,
min(block_timestamp) as first_tx
from optimism.core.fact_delegations
group by delegator)
select
date(date_trunc('day', first_tx)) as date,
count(*) as n_new_delegators,
sum(n_new_delegators) over (order by date asc rows between unbounded preceding and current row) as cum_delegators
from first
group by date