zakkisyedCopy of #2 Cumulative Eth Staked
    Updated 2022-09-13
    with daily_eth_staked as (
    select date_trunc(day,block_timestamp) as daily,
    SUM(eth_value) as staked_eth
    --cum_eth_deposited/32
    -- (SUM(eth_value))/32 OVER (ORDER BY date_trunc('day', block_timestamp) RANGE UNBOUNDED PRECEDING) AS validators
    FROM ethereum.core.fact_traces

    where to_address = lower('0x00000000219ab540356cBB839Cbe05303d7705Fa')
    and eth_value > 0
    and tx_status = 'SUCCESS'

    group by daily
    order by 1 desc
    )

    select daily,
    (sum(staked_eth)) OVER (ORDER BY daily RANGE UNBOUNDED PRECEDING) as cumulative_eth_staked

    from daily_eth_staked

    group by 1
    order by 1 desc



    Run a query to Download Data