Eman-RazCorrelation(PNG,ETH)
    Updated 2023-09-07
    with tab3 as (with tab1 as (select hour::date as day, avg(PRICE) as PNG_price
    from avalanche.core.fact_hourly_token_prices
    where token_address='0x60781c2586d68229fde47564546784ab3faca982'
    group by 1
    order by 1),
    tab2 as (select hour::date as day, avg(price) as ETH_price
    from ethereum.core.fact_hourly_token_prices
    where symbol='WETH'
    group by 1
    order by 1)

    select tab1.day as day, PNG_price, ETH_price
    from tab1 left join tab2 on tab1.day=tab2.day
    --where tab1.day>='2021-09-02'
    order by 1)

    select corr(PNG_price,ETH_price)
    from tab3
    Run a query to Download Data