Yousefi_1994Top 20 Qualified Pools on Sushiswap
    Updated 2022-09-30
    with sushiswap_pools as (
    select
    pool_address,
    pool_name,
    token0,
    token1
    from ethereum.core.dim_dex_liquidity_pools
    where platform = 'sushiswap'
    )
    select
    pool_name,
    sum(amount_usd) as pool_tvl
    from ethereum.erc20_balances, sushiswap_pools
    where user_address = pool_address
    and contract_address in (token0, token1)
    and balance_date = current_date - 1
    and amount_usd < 500000000
    group by pool_name
    having pool_tvl > 100000
    order by pool_tvl desc
    limit 20
    Run a query to Download Data