Afonso_Diaz2023-04-27 03:13 AM
    Updated 2023-04-26
    with t as (

    select
    hour::date as date,
    token_address,
    symbol,
    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,
    token_address,
    symbol,
    decimals,
    avg(price) as price_usd
    from ethereum.core.fact_hourly_token_prices
    where token_address in (
    '0x26b80fbfc01b71495f477d5237071242e0d959d7',
    '0x4e15361fd6b4bb609fa63c81a2be19d873717870',
    '0xea068fba19ce95f12d252ad8cb2939225c4ea02d',
    '0xd31a59c85ae9d8edefec411d448f90841571b89c',
    '0xae7ab96520de3a18e5e111b5eaab095312d7fe84',
    '0x0f3adc247e91c3c50bc08721355a41037e89bc20'
    )
    group by 1, 2, 3, 4
    ),

    t2 as (
    select
    t.wormhole_contract,
    t.token_address,
    t.decimals
    Run a query to Download Data