Updated 2022-12-20
    with op as (
    SELECT
    date_trunc('day', hour) AS date2,
    symbol,
    avg(price) as eth_price,
    max(price) as maxeth,
    min(price) as mineth,
    STDDEV(price) as stveth,
    stveth/eth_price as eth_pct
    FROM optimism.core.fact_hourly_token_prices
    where SYMBOL = 'OP'
    and HOUR > CURRENT_DATE-INTERVAL '3 MONTHS'
    group by 1,2
    order by 1 ASC
    ),

    eth as (
    SELECT
    date_trunc('day', hour) AS date2,
    symbol,
    avg(price) as eth_price,
    max(price) as maxeth,
    min(price) as mineth,
    STDDEV(price) as stveth,
    stveth/eth_price as eth_pct
    FROM ethereum.core.fact_hourly_token_prices
    where SYMBOL = 'WETH'
    and HOUR > CURRENT_DATE -INTERVAL '3 MONTHS'
    group by 1,2
    order by 1 ASC
    ),
    wbtc as (
    SELECT
    date_trunc('day', hour) AS date2,
    symbol,
    avg(price) as eth_price,
    Run a query to Download Data