rajsSTETH ETH Ratio
    Updated 2022-06-11
    with eth_price AS
    (
    SELECT
    hour,
    price
    from flipside_prod_db.ethereum_core.fact_hourly_token_prices
    where symbol = 'WETH'
    and hour >= CURRENT_DATE - interval '365 days'
    )
    ,

    steth_price as
    (
    SELECT
    hour,
    price
    from flipside_prod_db.ethereum_core.fact_hourly_token_prices
    where symbol = 'stETH'
    and hour >= CURRENT_DATE - interval '365 days'
    )
    ,

    ratio as
    (
    select
    e.hour,
    e.price as eth_price,
    s.price as steth_price,
    s.price / e.price as steth_to_eth_ratio
    from eth_price e
    left join steth_price s
    on e.hour = s.hour
    order by 1 desc
    )

    select
    Run a query to Download Data