Afonso_Diaz2023-04-21 05:25 AM
    Updated 2023-10-16
    with
    t as (
    select
    recorded_hour::date as date,
    symbol,
    avg(price) as price_usd
    from osmosis.price.ez_prices
    where symbol = 'OSMO'
    and date >= '2022-01-01'
    group by 1, 2

    union all

    select
    recorded_hour::date as date,
    'FLOW' as symbol,
    avg((open + close) / 2) as price_usd
    from flow.price.fact_hourly_prices
    where token = 'Flow'
    and date >= '2022-01-01'
    group by 1, 2

    union all

    select hour::date as date,
    'AXL' as symbol,
    avg(price) as price_usd
    from ethereum.price.ez_hourly_token_prices
    where symbol = 'AXL'
    and date >= '2022-01-01'
    group by 1, 2

    union all

    select recorded_hour::date as date,
    'ATOM' as symbol,
    Run a query to Download Data