rackhaelNEAR Vs SOL Token prices November
    Updated 2022-11-17
    --CREDIT @amin1236
    with nearpricet as (
    select timestamp::date as day,
    avg (price_usd) as usdprice
    from near.core.fact_prices
    where symbol = 'wNEAR'
    and timestamp >= '2022-11-01'
    group by 1),

    solpricet as (
    select block_timestamp::date as day,
    median (swap_to_amount/swap_from_amount) as USDPrice
    from solana.fact_swaps
    where swap_from_mint = 'So11111111111111111111111111111111111111112'
    and swap_to_mint in ('EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v','Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB') --USDC,USDT
    and swap_to_amount > 0
    and swap_from_amount > 0
    and succeeded = 'TRUE'
    group by 1)

    select t1.day,
    t1.usdprice as NEAR,
    t2.usdprice as SOL
    from nearpricet t1 join solpricet t2 on t1.day = t2.DAY
    Run a query to Download Data