mattkstewQualified Pools 4
    Updated 2022-07-06
    with tab1 as (
    select
    ethereum.core.dim_dex_liquidity_pools.pool_address as pool,
    avg(flipside_prod_db.ethereum.erc20_balances.amount_usd)
    from ethereum.core.dim_dex_liquidity_pools
    left outer join flipside_prod_db.ethereum.erc20_balances
    on ethereum.core.dim_dex_liquidity_pools.pool_address = flipside_prod_db.ethereum.erc20_balances.user_address
    where balance_date > current_date - 4
    group by 1
    having avg(flipside_prod_db.ethereum.erc20_balances.amount_usd) > 100000
    )
    select
    flipside_prod_db.ethereum.erc20_balances.symbol,
    avg(flipside_prod_db.ethereum.erc20_balances.amount_usd)
    from ethereum.core.dim_dex_liquidity_pools
    left outer join flipside_prod_db.ethereum.erc20_balances
    on ethereum.core.dim_dex_liquidity_pools.pool_address = flipside_prod_db.ethereum.erc20_balances.user_address
    where ethereum.core.dim_dex_liquidity_pools.pool_address in (select pool from tab1 )
    and balance_date > current_date - 4
    group by 1
    Run a query to Download Data