cloudr3nRune Price vs Swap Volume
    Updated 2022-01-26


    with price_table as (
    select date(block_timestamp) as dates, avg(RUNE_USD) as Rune_Price
    from thorchain.prices
    group by dates
    ),
    TVL_table as (
    select day,total_value_pooled, total_value_pooled_usd, total_value_locked, total_value_locked_usd
    from thorchain.daily_tvl
    )

    -- Swap Volume
    select sv.day, swap_volume_rune, swap_volume_rune_usd, price_table.Rune_Price, total_value_pooled, total_value_pooled_usd, total_value_locked, total_value_locked_usd
    from thorchain.daily_pool_stats sv
    join price_table
    on price_table.dates = sv.day
    join TVL_table on sv.day = TVL_table.DAY
    Where CURRENT_DATE - sv.day < 90
    Run a query to Download Data