hmxintern📚 🕛
    Updated 2024-05-29
    with config as (
    select timestamp '2024-03-01 00:00:00' as start_date,
    timestamp '2024-05-01 23:59:59' as end_date
    ),
    prices as (
    select * from
    (
    -- HMX Price
    (select date_trunc('day', hour) as time, symbol, decimals,
    avg(price) as price
    from arbitrum.price.ez_prices_hourly
    where symbol = 'HMX' and hour >= (select start_date from config)
    and hour <= (select end_date from config)
    group by date_trunc('day', hour), symbol, decimals)

    union all
    -- USDB Price
    (select date_trunc('day', hour) as time, symbol, decimals,
    avg(price) as price
    from blast.price.ez_prices_hourly
    where symbol = 'USDB' and hour >= (select start_date from config)
    and hour <= (select end_date from config)
    group by date_trunc('day', hour), symbol, decimals)
    union all
    -- PYTH Price
    (select date_trunc('day', hour) as time, symbol, decimals,
    avg(price) as price
    from solana.price.ez_prices_hourly
    where symbol = 'PYTH' and hour >= (select start_date from config)
    and hour <= (select end_date from config)
    group by date_trunc('day', hour), symbol, decimals)
    )
    ),
    rewarder_token (rewarder, price_symbol) as (
    select * from
    QueryRunArchived: QueryRun has been archived