CarlOwOsLargest Increases in Liquidity over 24h, Feb 16 to May 17 2022
    Updated 2022-05-18
    with pools_tvl as (
    select balance_date, sum(amount_usd) as tvl, pool_name
    from ethereum.erc20_balances bal
    join ethereum.dex_liquidity_pools dex on bal.user_address = dex.pool_address
    where amount_usd > 0 and platform = 'sushiswap' and pool_name <> 'LAR-USDT LP'
    and balance_date >= '2022-02-16' and balance_date <= '2022-05-17'
    group by balance_date, pool_name
    order by balance_date, tvl desc
    ),
    diff as(select t2.balance_date, t2.tvl-t1.tvl as increase, t1.pool_name
    , row_number() over (partition by t1.balance_date order by increase desc) as pool_rank
    from pools_tvl t1, pools_tvl t2
    where dateadd('DAY',-1,t2.balance_date) = t1.balance_date and t1.pool_name = t2.pool_name
    order by 1, 2
    )
    select balance_date, increase, pool_name
    from diff
    where pool_rank < 6
    order by balance_date, increase desc

    Run a query to Download Data