yasmin-n-d-r-hluna price 2
    Updated 2023-01-17
    with lunapricet as (
    select
    RECORDED_HOUR hour,
    (CLOSE + open) / 2 price
    from
    crosschain.core.fact_hourly_prices
    where
    ID ilike 'terra-luna-2'
    and RECORDED_HOUR between '2023-01-08'
    and '2023-01-11'
    group by
    1,
    2
    ),
    btct as (
    select
    hour,
    avg (price) as BTC
    from
    ethereum.core.fact_hourly_token_prices
    where
    symbol in ('WBTC')
    and HOUR between '2023-01-08'
    and '2023-01-11'
    group by
    1
    )
    select
    t1.hour,
    price,
    BTC
    from
    lunapricet t1
    join btct t2 on t1.hour = t2.hour


    Run a query to Download Data