hessDaily Price Change January
    Updated 2024-05-10
    with sei_price as (Select TO_TIMESTAMP(value[0]::string) as date,
    'SEI' as symbol, value[1] as avg_price
    from (
    SELECT livequery.live.udf_api(
    'https://api.coingecko.com/api/v3/coins/sei-network/market_chart?vs_currency=usd&days=90&interval=daily&precision=3') as resp
    )
    ,LATERAL FLATTEN (input => resp:data:prices))
    ,
    price as (select date,
    symbol,
    avg_price
    from sei_price
    where date::date = '2024-04-01'
    UNION
    select date(hour) as date,
    symbol,
    avg(price) as avg_price
    from ethereum.price.ez_hourly_token_prices
    where symbol in ('WETH','WMATIC','WBNB')
    and hour::date = '2024-04-01'
    group by 1,2
    UNION
    select date(hour) as date,
    symbol,
    avg(price) as avg_price
    from avalanche.price.ez_hourly_token_prices
    where symbol in ('WAVAX')
    and hour::date = '2024-04-01'
    group by 1,2
    UNION
    select date(hour) as date,
    symbol,
    avg(price) as avg_price
    from arbitrum.price.ez_hourly_token_prices
    where symbol in ('ARB')
    and hour::date = '2024-04-01'
    QueryRunArchived: QueryRun has been archived