LTirrell2022-02-25_terra_steady
    Updated 2022-03-03
    with eth_prices as (
    select
    date_trunc('hour', hour) as datetime,
    symbol,
    avg(price) as price
    from
    ethereum.token_prices_hourly
    where
    symbol in (
    'WBTC',
    'WETH',
    -- starts on Jan-21, so good for the last 30days?
    'BNB',
    -- 'AVAX', -- only 3 data points
    'FTM',
    -- Only want to look at layer ones...
    -- 'AAVE',
    -- 'UNI',
    -- 'CRV',
    -- 'CVX'
    -- besides for MATIC, since it's well establised as a layer 2
    'MATIC'
    )
    and datetime >= '2021-09-30'
    group by
    datetime,
    symbol
    order by
    datetime
    ),
    luna_price as (
    select
    date_trunc('hour', block_timestamp) as datetime,
    symbol,
    avg(price_usd) as price
    from
    Run a query to Download Data