Yousefi_1994Amount of ETH that has been staked with Lido
    Updated 2022-06-15
    with amount_of_eth_staked_with_lido as (
    select
    sum(event_inputs:value::float)/1e18 as staked_with_lido
    from ethereum.core.fact_event_logs
    where event_name = 'Transfer'
    and contract_address = '0xae7ab96520de3a18e5e111b5eaab095312d7fe84'
    and event_inputs:from::string = '0x0000000000000000000000000000000000000000'
    ),
    eth_usd_price as (
    select
    price
    from ethereum.core.fact_hourly_token_prices
    where symbol is null
    and token_address is null
    and hour::date = current_date - 1
    and hour(hour) = 0
    )

    select
    current_date - 1 as date,
    stak.staked_with_lido as staked_with_lido_eth,
    (price.price * stak.staked_with_lido) as staked_with_lido_usd,
    price.price as eth_price
    from amount_of_eth_staked_with_lido stak
    join eth_usd_price price
    Run a query to Download Data