amelia-leeslash
Updated 2022-11-11
99
1
2
3
4
5
6
7
8
9
10
11
›
⌄
with base as (select
DATE_TRUNC ('DAY', SLOT_TIMESTAMP) as daily, IFF (ATTESTER_SLASHINGS = [], 'Healthy','Slashed') as Type,
COUNT (DISTINCT SLOT_NUMBER) as Slots_Count
FROM ethereum.beacon_chain.fact_blocks
WHERE ATTESTER_SLASHINGS is not null
and SLOT_TIMESTAMP < CURRENT_DATE group by 1,2)
SELECT *,
sum(Slots_Count) over (order by daily) as cumulative
from base
WHERE Type !='Healthy'
Run a query to Download Data