bachiethbad8
    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())
    group by day ),


    btc as (select date(block_hour) as day,
    round(avg(price_usd),2) as price_usd
    from flipside_prod_db.algorand.prices_swap
    where day >= dateadd(month, -1, getdate())
    and asset_name = 'goBTC'
    group by day
    order by day desc),

    rune as (select date(block_timestamp) as day,
    round(avg(rune_usd),2) as price_usd
    from flipside_prod_db.thorchain.prices
    where day >= dateadd(month, -1, getdate())
    group by day
    order by day desc),

    matic as (select date(hour) as day,
    round(avg(price),2) as price_usd
    from ethereum.core.fact_hourly_token_prices
    where symbol = 'MATIC'
    and day >= dateadd(month, -1, getdate())
    Run a query to Download Data