alitaslimiSwaps Cost
    Updated 2024-01-15
    with
    ------------------------------ Prices ------------------------------
    prices as (
    select
    hour::date as date,
    'AVAX' as symbol,
    avg(price) as price
    from
    avalanche.price.ez_hourly_token_prices
    where
    hour::date between (current_date - 31) and (current_date - 1)
    and symbol = 'WAVAX'
    group by
    date
    union
    select
    hour::date as date,
    'ETH' as symbol,
    avg(price) as price
    from
    ethereum.price.ez_hourly_token_prices
    where
    hour::date between (current_date - 31) and (current_date - 1)
    and symbol = 'WETH'
    group by
    date
    union
    select
    hour::date as date,
    'MATIC' as symbol,
    avg(price) as price
    from
    polygon.price.ez_hourly_token_prices
    where
    hour::date between (current_date - 31) and (current_date - 1)
    and symbol = 'MATIC'
    QueryRunArchived: QueryRun has been archived