Eman-RazCorrelation Coefficient (CC) (Price,TVL)
    Updated 2025-02-05
    with tab1 AS (select date as "Date", tvl_usd as "TVL"
    from external.defillama.fact_chain_tvl
    where chain='Aurora' and date>='{{Start_Date}}' and date<='{{End_Date}}'),

    tab2 as (select hour::date as "Date", avg(price) as "Price"
    from near.price.ez_prices_hourly
    where token_address='aaaaaa20d9e0e2461697782ef11675f668207961.factory.bridge.near'
    and hour::date>='{{Start_Date}}' and hour::date<='{{End_Date}}'
    group by 1)

    select corr("TVL","Price") as CC
    from tab1 left join tab2 on tab1."Date"=tab2."Date"

    Last run: 2 months ago
    CC
    1
    0.9804180468
    1
    16B
    3s