mariya DAI vs UST Price
    Updated 2022-05-10
    WITH dai AS (
    SELECT
    date_trunc('day', hour) as time, avg(price) as DAI_price
    FROM ethereum_core.fact_hourly_token_prices
    WHERE symbol = 'DAI'
    GROUP BY time
    ),
    ust AS (
    SELECT
    date_trunc('day', block_timestamp) as time, avg(price_usd) as UST_price
    FROM terra.oracle_prices
    WHERE symbol = 'UST'
    GROUP BY time
    )
    SELECT dai.time, DAI_price, UST_price, 1 as pegged
    FROM dai
    JOIN ust
    ON dai.time = ust.time
    Run a query to Download Data