select trunc(slot_timestamp, 'day') as date,
count(distinct slot_number) as slots,
count(distinct source_root) as validators,
count(distinct target_root) as targets,
count(distinct attestation_signature) as attestations,
sum(attestations) over (order by date) as cum_attestations,
sum(slots) over (order by date) as cumu_slots
from ethereum.beacon_chain.fact_attestations
where slot_timestamp BETWEEN '2022-09-15' and CURRENT_DATE - 1
group by date