binhachon28. [Easy] Price Correlation -RUNE, XRUNE and THOR
    Updated 2021-12-11
    with rune_prices as(
    select
    date_trunc('hour', block_timestamp) as blocktime,
    avg(RUNE_USD) as rune_price
    from
    thorchain.prices
    group by
    blocktime
    ),
    xrune_price as(
    select
    hour as blocktime,
    price as xrune_price
    from
    ethereum.token_prices_hourly
    where
    symbol = ('XRUNE')
    ),
    thor_price as(
    select
    hour as blocktime,
    price as thor_price
    from
    ethereum.token_prices_hourly
    where
    symbol = 'THOR'
    )
    select
    rune_prices.blocktime,
    rune_price,
    xrune_price,
    thor_price
    from
    rune_prices
    left join xrune_price on rune_prices.blocktime = xrune_price.blocktime
    left join thor_price on rune_prices.blocktime = thor_price.blocktime
    Run a query to Download Data