0xHaM-dDaily Price Changes
    Updated 2024-12-14
    with
    -- apt_price as (
    -- SELECT
    -- date(hour) as date,
    -- symbol,
    -- avg(price) as avg_price
    -- FROM aptos.price.ez_prices_hourly
    -- where symbol in ('APT')
    -- )
    -- ,
    price as (
    SELECT
    date(hour) as date,
    symbol,
    avg(price) as avg_price
    FROM aptos.price.ez_prices_hourly
    where symbol in ('APT')
    AND date::date = current_date() - 91
    group by 1,2
    UNION
    select
    date(hour) as date,
    symbol,
    avg(price) as avg_price
    from ethereum.price.ez_prices_hourly
    where symbol in ('WETH','WMATIC','WBTC')
    and hour::date = current_date() - 91
    group by 1,2
    UNION
    select
    date(recorded_hour) as date,
    symbol,
    avg(price) as avg_price
    from osmosis.price.ez_prices
    where symbol in ('ATOM')
    and date = current_date() - 91
    QueryRunArchived: QueryRun has been archived