select
date_trunc('{{ period }}', block_timestamp) as date,
blockchain,
count(distinct tx_hash) as transactions,
count(distinct service_id) as services,
sum(transactions) over (partition by blockchain order by date) as cumulative_transactions
from
crosschain.olas.fact_service_events
where block_timestamp >= '2024-01-01'
group by 1, 2
order by 1, 2