elvisThor10.1 - Pool TVL and imbalance
    Updated 2021-11-01
    /* What is the volume of each pool by TVL? How does that compare to the depth of each pool in terms of the unique number of liquidity providers?
    Hint: use daily_pool_stats + liquidity_actions*/

    SELECT
    pool_name as pool, day as dt, asset_liquidity * asset_price_usd as asset_liquidity_usd, rune_liquidity * rune_price_usd as rune_liquidity_usd, rune_liquidity_usd+asset_liquidity_usd as tvl_usd,
    rune_liquidity_usd-asset_liquidity_usd as pool_imbalance
    FROM thorchain.daily_pool_stats
    WHERE
    dt > CURRENT_DATE - 90 AND tvl_usd != 0
    --Group BY 1,2
    ORDER BY
    tvl_usd DESC
    Run a query to Download Data