select
block_timestamp::date as day
,(select min(EVENT_TYPE) from flow.core.fact_events where flow.core.fact_events.tx_id = flow.core.fact_transactions.tx_id) as event
,count (DISTINCT tx_id) as tx_count
,sum (tx_count) over (partition by event order by day) as cum_transactions
from flow.core.fact_transactions
where TX_SUCCEEDED = TRUE
group by 1,2
order by 1