Soheil_MKETH volatility vs Rune volatility per day
    Updated 2022-06-30
    with eth_price as (
    select
    date_trunc('day', hour) as date,
    avg(price) as eth_price,
    lag(eth_price) ignore nulls over(order by date asc) as lag_eth_price,
    ((eth_price-lag_eth_price)/ lag_eth_price)*100 as ETH_volatility
    from ethereum.token_prices_hourly
    where symbol = 'WETH'
    and date >='2022-01-01'
    group by date
    order by date
    ),


    rune_price as (
    select
    date_trunc('day', BLOCK_TIMESTAMP) as date,
    avg(RUNE_USD) as rune_price,
    lag(rune_price) ignore nulls over(order by date asc) as lag_rune_price,
    ((rune_price-lag_rune_price)/ lag_rune_price)*100 as rune_volatility
    from flipside_prod_db.thorchain.prices
    where date >='2022-01-01'
    group by 1
    order by 1
    ),


    main1 as (
    select
    eth.date,
    eth.ETH_volatility,
    rune.rune_volatility
    from eth_price eth
    join rune_price rune
    on eth.date=rune.date
    )
    Run a query to Download Data