Crazy_KidMIM & Its Peg
    Updated 2022-02-10
    WITH mim AS (SELECT DATE(hour) as date, avg(price) as price_mim
    FROM ethereum.token_prices_hourly
    WHERE symbol = 'MIM' AND date >= '2022-01-01'
    GROUP BY date),

    ust AS (SELECT DATE(hour) as date, avg(price) as price_ust
    FROM ethereum.token_prices_hourly
    WHERE symbol = 'UST' AND date >= '2022-01-01'
    GROUP BY date),

    usdc AS (SELECT DATE(hour) as date, avg(price) as price_usdc
    FROM ethereum.token_prices_hourly
    WHERE symbol = 'USDC' AND date >= '2022-01-01'
    GROUP BY date)

    SELECT mim.date as date, price_mim, price_ust, price_usdc
    FROM mim join ust on mim.date = ust.date
    join usdc on mim.date = usdc.date
    ORDER BY DATE DESC
    Run a query to Download Data