bachiethbad1
    Updated 2022-11-25
    with eth as (
    select
    date(hour) as day,
    round(
    avg(price),
    2
    ) as price_usd
    from
    ethereum.core.fact_hourly_token_prices
    where
    token_address = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
    and day >= dateadd(
    month,
    -1,
    getdate()
    )
    group by
    day
    order by
    day desc
    ),
    sol as (
    select
    date(recorded_hour) as day,
    round(
    avg(close),
    2
    ) as price_usd
    from
    solana.core.fact_token_prices_hourly
    where
    symbol = 'SOL'
    and day >= dateadd(
    month,
    -1,
    getdate()
    Run a query to Download Data