saeedmzn$OP Airdrop - price compare
    Updated 2022-11-16
    with op_price as (
    select date_trunc(day,HOUR) ::date date ,
    avg(price) OP_price
    from optimism.core.fact_hourly_token_prices
    where SYMBOL = 'OP'
    group by 1
    ),
    ETH_price as (
    select date_trunc(day,HOUR) ::date date,
    avg (price) as ETH_Price
    from ethereum.core.fact_hourly_token_prices
    where symbol in ('WETH') and hour >= '2022-05-31'
    group by 1),
    BTC_price as (
    select date_trunc(day,HOUR) ::date date,
    avg (price) as BTC_Price
    from ethereum.core.fact_hourly_token_prices
    where symbol = 'WBTC'
    group by 1
    ),
    OP_peer_ETH as (
    select date,
    (OP_price/ETH_Price) OP_peer_ETH,
    (OP_price/BTC_Price) OP_peer_BTC
    from op_price join ETH_price using (date)
    join BTC_price using (date)
    group by 1,2 ,3
    )
    select * from OP_peer_ETH
    Run a query to Download Data