BlockTrackercorrelation
    Updated 2025-03-03
    -- forked from $RUNE price with Volume @ https://flipsidecrypto.xyz/studio/queries/30bee4e7-f130-4627-a105-7c80f461e063



    select
    CORR(swap_volume, rune_usd) AS correlation
    from (
    select
    date_trunc('week', block_timestamp) as date,
    sum(coalesce(from_amount_usd, to_amount_usd)) as swap_volume,
    avg(rune_usd) as rune_usd
    from thorchain.defi.fact_swaps
    where date >= '2023-01-01'
    group by 1
    )



    QueryRunArchived: QueryRun has been archived