CryptoLionMulti-Pool Pairs (BTC-ETH)
    Updated 2023-03-27
    SELECT
    -- pool_address,
    uniswapv3.pool_stats.pool_name,
    uniswapv3.pools.fee_percent,
    uniswapv3.pools.tick_spacing,
    avg(token0_balance_adjusted) as t0_VOLUME,
    avg(token1_balance_adjusted) as t1_VOLUME,
    avg(token0_balance_usd) as t0_USD,
    avg(token1_balance_usd) as t1_USD,
    avg(virtual_liquidity_adjusted) as liquidity,
    avg(virtual_reserves_token0_adjusted) as t0_liquidity_usd,
    avg(virtual_reserves_token1_adjusted) as t1_liquidity_usd,
    avg(uniswapv3.swaps.amount0_usd) as t0_swap_volume,
    avg(uniswapv3.swaps.amount1_usd) as t1_swap_volume,
    count(uniswapv3.swaps.block_id) as swaps
    FROM uniswapv3.pool_stats
    INNER JOIN uniswapv3.pools on uniswapv3.pool_stats.pool_name = uniswapv3.pools.pool_name
    INNER JOIN uniswapv3.swaps on uniswapv3.pool_stats.pool_name = uniswapv3.swaps.pool_name
    WHERE uniswapv3.pool_stats.pool_name LIKE 'WBTC-WETH%'
    AND uniswapv3.pool_stats.block_timestamp >= getdate() - interval '7 days'
    AND uniswapv3.swaps.block_timestamp >= getdate() - interval '7 days'
    GROUP BY uniswapv3.pool_stats.pool_name, uniswapv3.pools.fee_percent, uniswapv3.pools.tick_spacing
    ORDER BY uniswapv3.pool_stats.pool_name