amdonatusprincepool-info (fee indepth)
    Updated 2022-11-28
    with lp_top5 as (
    select
    pool_name,
    avg(token0_balance_usd + token1_balance_usd) as tvl,
    'top_pool' as type
    from uniswapv3.pool_stats
    where token0_balance_usd is not null and token1_balance_usd is not null
    and pool_name is not null
    group by pool_name
    order by tvl desc
    limit 100
    ),
    lp_bottom5 as (
    select
    pool_name,
    avg(token0_balance_usd + token1_balance_usd) as tvl,
    'bottom_pool' as type
    from uniswapv3.pool_stats
    where token0_balance_usd is not null and token1_balance_usd is not null
    and pool_name is not null
    group by pool_name
    order by tvl asc
    limit 100
    ),
    lps as (
    select * from lp_bottom5 union
    select * from lp_top5
    ),

    swap_txns as (
    select
    pool_name,
    pool_address,
    tx_id,
    sender
    from uniswapv3.swaps
    Run a query to Download Data