Afonso_Diaz2023-08-04 12:49 PM
    Updated 2023-08-04
    with

    t as (
    select
    hour::date as date,
    symbol,
    token_address,
    decimals,
    avg(price) as price_usd
    from avalanche.core.fact_hourly_token_prices
    group by 1, 2, 3, 4

    union all

    select
    hour::date as date,
    'ggAVAX' as symbol,
    '0xa25eaf2906fa1a3a13edac9b9657108af7b703e3' as token_address,
    decimals,
    avg(price) as price_usd
    from avalanche.core.fact_hourly_token_prices
    where token_address = '0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7'
    group by 1, 2, 3, 4

    union all

    select
    hour::date as date,
    'yyAVAX' as symbol,
    '0xf7d9281e8e363584973f946201b82ba72c965d27' as token_address,
    decimals,
    avg(price) as price_usd
    from avalanche.core.fact_hourly_token_prices
    where token_address = '0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7'
    group by 1, 2, 3, 4

    Run a query to Download Data